diff --git a/src/stores/auth.ts b/src/stores/auth.ts index 1430139..4a6b7e9 100644 --- a/src/stores/auth.ts +++ b/src/stores/auth.ts @@ -63,13 +63,13 @@ export const useAuthStore = create()( // Step 2: WebAuthn ceremony const publicKeyOptions: PublicKeyCredentialRequestOptions = { - challenge: fromBase64url(options.challenge), + challenge: fromBase64url(options.challenge).buffer as ArrayBuffer, rpId: options.rpId, userVerification: options.userVerification as UserVerificationRequirement, timeout: options.timeout, allowCredentials: options.allowCredentials?.map((c: any) => ({ type: c.type as PublicKeyCredentialType, - id: fromBase64url(c.id), + id: fromBase64url(c.id).buffer as ArrayBuffer, transports: c.transports as AuthenticatorTransport[], })), }; @@ -124,10 +124,10 @@ export const useAuthStore = create()( // Step 2: WebAuthn ceremony const publicKeyOptions: PublicKeyCredentialCreationOptions = { - challenge: fromBase64url(options.challenge), + challenge: fromBase64url(options.challenge).buffer as ArrayBuffer, rp: options.rp, user: { - id: fromBase64url(options.user.id), + id: fromBase64url(options.user.id).buffer as ArrayBuffer, name: options.user.name, displayName: options.user.displayName, },