fix: ArrayBuffer type casts for WebAuthn in TS 5.x strict mode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
88aebcd997
commit
d7fc2cc8db
|
|
@ -63,13 +63,13 @@ export const useAuthStore = create<AuthState>()(
|
|||
|
||||
// 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<AuthState>()(
|
|||
|
||||
// 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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue