fix: override WebAuthn credential type for Logto Account API
@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:
@@ -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(() => ({}));
|
||||||
|
|||||||
Reference in New Issue
Block a user