core&ui: upgrade simplewebauthn

This commit is contained in:
undefined committed 2025-02-15 10:43:15 +08:00
1 parent 3a30cc55f9
commit 04fcd57f51
9 files changed
+20 -26

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@
"@hydrooj/utils": "workspace:^",
"@sentry/browser": "^8.54.0",
"@sentry/webpack-plugin": "^3.1.2",
"@simplewebauthn/browser": "9.0.1",
"@simplewebauthn/browser": "13.1.0",
"@svgr/webpack": "^8.1.0",
"@types/jquery": "^3.5.32",
"@types/jquery.transit": "^0.9.33",
@@ -68,7 +68,7 @@ async function enableAuthn(type: string) {
let credential;
try {
console.log(authnInfo);
credential = await startRegistration(authnInfo.authOptions);
credential = await startRegistration({ optionsJSON: authnInfo.authOptions });
} catch (err) {
Notification.error(i18n('Failed to get credential: {0}', err));
return;
@@ -18,7 +18,7 @@ async function verifywebauthn($form) {
return null;
}
Notification.info(i18n('Please follow the instructions on your device to complete the verification.'));
const result = await startAuthentication(authnInfo.authOptions)
const result = await startAuthentication({ optionsJSON: authnInfo.authOptions })
.catch((e) => {
Notification.error(i18n('Failed to get credential: {0}', e));
return null;