mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-27 10:08:44 +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 {
|
try {
|
||||||
const publicKey =
|
// The server returns the options wrapped as { publicKey: {...}, mediation: ... }
|
||||||
PublicKeyCredential.parseRequestOptionsFromJSON(webauthn_challenge);
|
const publicKey = PublicKeyCredential.parseRequestOptionsFromJSON(
|
||||||
|
webauthn_challenge.publicKey ?? webauthn_challenge
|
||||||
|
);
|
||||||
const credential = await navigator.credentials.get({ publicKey });
|
const credential = await navigator.credentials.get({ publicKey });
|
||||||
await api
|
await api
|
||||||
.post(apiUrl(ApiEndpoints.auth_webauthn_login), {
|
.post(apiUrl(ApiEndpoints.auth_webauthn_login), {
|
||||||
|
|||||||
Reference in new issue
Block a user