fix: override WebAuthn type in authentication verify too
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user