fix: override WebAuthn type in authentication verify too
All checks were successful
CI / build (push) Successful in 1m57s
CI / docker (push) Successful in 1m30s

Same fix as registration verify — @simplewebauthn/browser returns
type: "public-key" but Logto expects type: "WebAuthn".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-27 20:57:37 +02:00
parent 0481cefaf4
commit e21a9d6046

View File

@@ -287,7 +287,7 @@ export async function startWebAuthnAuth(): Promise<{ verificationId: string; aut
}
export async function verifyWebAuthnAuth(verificationId: string, payload: Record<string, unknown>): Promise<string> {
const res = await request('POST', '/verification/web-authn/authentication/verify', { verificationId, payload });
const res = await request('POST', '/verification/web-authn/authentication/verify', { verificationId, payload: { ...payload, type: 'WebAuthn' } });
if (!res.ok) {
const err = await res.json().catch(() => ({}));
if (res.status === 422) {