Skip to content

Commit

Permalink
normalizing the result from 'auth()' so that 'response.userID' is a '…
Browse files Browse the repository at this point in the history
…Uint8Array' instead of raw 'ArrayBuffer'
  • Loading branch information
getify committed Mar 20, 2024
1 parent 43eaa04 commit bf84580
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,12 @@ async function auth(authOptions = authDefaults()) {
[ "flags", "signCount", "userPresence", "userVerification", ].includes(key)
))
)),
...(authResult.response.userHandle != null ? { userID: authResult.response.userHandle, } : null),
...(
authResult.response.userHandle != null ?
{ userID: new Uint8Array(authResult.response.userHandle), } :

null
),
raw: authResult.response,
},
};
Expand Down

0 comments on commit bf84580

Please sign in to comment.