diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-07-22 10:23:11 +0300 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2020-07-22 21:56:42 +0300 |
commit | 4c08b1754da4407f2eb905be7580e7cd886cefdd (patch) | |
tree | 36ad5c55abfef0aebc0911119ab66667296c2ad1 /core/src | |
parent | c842678f0a1fb65981a03302895192ddc58479c9 (diff) |
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>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/components/login/PasswordLessLoginForm.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/components/login/PasswordLessLoginForm.vue b/core/src/components/login/PasswordLessLoginForm.vue index 5326ab7a5f3..87544e0ffff 100644 --- a/core/src/components/login/PasswordLessLoginForm.vue +++ b/core/src/components/login/PasswordLessLoginForm.vue @@ -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, }, } }) |