fix: override WebAuthn credential type for Logto Account API
All checks were successful
CI / build (push) Successful in 3m29s
CI / docker (push) Successful in 2m14s

@simplewebauthn/browser returns type: "public-key" (W3C standard) but
Logto's verify endpoint expects type: "WebAuthn".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-27 17:59:53 +02:00
parent e7952dd9de
commit c360d9ad5f

View File

@@ -40,7 +40,7 @@ export async function registerPasskey(getAccountToken: () => Promise<string>): P
'POST', 'POST',
'/verifications/web-authn/registration/verify', '/verifications/web-authn/registration/verify',
token, token,
{ verificationRecordId, payload: credential }, { verificationRecordId, payload: { ...credential, type: 'WebAuthn' } },
); );
if (!verifyRes.ok) { if (!verifyRes.ok) {
const err = await verifyRes.json().catch(() => ({})); const err = await verifyRes.json().catch(() => ({}));