Do not double encode the userid in webauthn login
* Else login fails with webauthn devices that send the userid - Like windows hello Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
parent
5b5cc637e8
commit
1a483167e9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -155,6 +155,10 @@ export default {
|
|||
return window.btoa(String.fromCharCode(...a))
|
||||
}
|
||||
|
||||
const arrayToString = function(a) {
|
||||
return String.fromCharCode(...a)
|
||||
}
|
||||
|
||||
return navigator.credentials.get({ publicKey })
|
||||
.then(data => {
|
||||
console.debug(data)
|
||||
|
@ -168,7 +172,7 @@ export default {
|
|||
authenticatorData: arrayToBase64String(new Uint8Array(data.response.authenticatorData)),
|
||||
clientDataJSON: arrayToBase64String(new Uint8Array(data.response.clientDataJSON)),
|
||||
signature: arrayToBase64String(new Uint8Array(data.response.signature)),
|
||||
userHandle: data.response.userHandle ? arrayToBase64String(new Uint8Array(data.response.userHandle)) : null,
|
||||
userHandle: data.response.userHandle ? arrayToString(new Uint8Array(data.response.userHandle)) : null,
|
||||
},
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue