Problem converting public key generated by startRegistration
into proper Buffer for passkey authentication
#614
Replies: 3 comments
-
To provide more context I am using the following config in my pubKeyCredParams: [
{ alg: -7, type: 'public-key' },
{ alg: -257, type: 'public-key' },
], |
Beta Was this translation helpful? Give feedback.
-
And, I am using something like the below to convert the publicKey: import { isoBase64URL } from '@simplewebauthn/server/helpers';
const base64URLPublicKey = isoBase64URL.fromBuffer(publicKey); |
Beta Was this translation helpful? Give feedback.
-
Yes I have somewhat similar problem, I am using appwrite, and I thought of saving the the 'verificationResultInfo' that contains publicKey in database in string format, by doing JSON.stringify, but the method is altering the verificationResult, what are the ideal ways of doing it? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I have been trying to convert the public key string (one starting with the letter "M") generated by the
startRegistration
method into a format that is acceptable for passkey authentication by theverifyAuthenticationResponse
, but it seems the results I got is aTypeError: cosePublicKey.get is not a function
withcredentialPublicKey: Uint8Array(91)
. I have tried using the testcredentialPublicKey
with valuepQECAyYgASFYILTrxTUQv3X4DRM6L_pk65FSMebenhCx3RMsTKoBm-AxIlggEf3qk5552QLNSh1T1oQs7_2C2qysDwN4r4fCp52Hsqs
as used in "https://github.com/MasterKale/SimpleWebAuthn/blob/master/packages/server/src/authentication/verifyAuthenticationResponse.test.ts", which can be converted in into aUint8Array
of size77
, which seemed to have been deemed acceptable by theverifyAuthenticationResponse
method as input, though of course as this is dummy data the user is not verified as a result.I wish someone with the insight could shed some light on this issue I have encountered. Any help in this regard would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions