Skip to content

Commit

Permalink
Merge pull request #41 from asgarovf/feat/add-userhandle-response
Browse files Browse the repository at this point in the history
feat: added optional `userHandle` field to authentication response
  • Loading branch information
dagnelies committed Mar 11, 2024
2 parents 72d6fbe + 88a7938 commit efed234
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export async function authenticate(credentialIds :string[], challenge :string, o
authenticatorData: utils.toBase64url(response.authenticatorData),
clientData: utils.toBase64url(response.clientDataJSON),
signature: utils.toBase64url(response.signature),
userHandle: response.userHandle ? utils.toBase64url(response.userHandle) : null
}

return authentication
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface AuthenticationEncoded {
authenticatorData: string
clientData: string
signature: string
userHandle?: string | null
}

export interface AuthenticationParsed {
Expand Down

0 comments on commit efed234

Please sign in to comment.