Merge pull request #21953 from nextcloud/backport/21946/stable19
[stable19] Do not double encode the userid in webauthn login
This commit is contained in:
commit
fcc708ff22
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