mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-24 00:36:39 +00:00
backport fix (#13262)
This commit is contained in:
1 parent
5cb5bc03eb
commit
7a137c8947
1 file changed
+4
-2
@@ -793,8 +793,10 @@ export async function handleWebauthnLogin(
|
||||
}
|
||||
|
||||
try {
|
||||
const publicKey =
|
||||
PublicKeyCredential.parseRequestOptionsFromJSON(webauthn_challenge);
|
||||
// The server returns the options wrapped as { publicKey: {...}, mediation: ... }
|
||||
const publicKey = PublicKeyCredential.parseRequestOptionsFromJSON(
|
||||
webauthn_challenge.publicKey ?? webauthn_challenge
|
||||
);
|
||||
const credential = await navigator.credentials.get({ publicKey });
|
||||
await api
|
||||
.post(apiUrl(ApiEndpoints.auth_webauthn_login), {
|
||||
|
||||
Reference in new issue
Block a user