core&ui: upgrade webauthn lib (#847)

This commit is contained in:
panda authored and GitHub committed 2024-08-02 18:23:51 +08:00
1 parent 62613937cf
commit a1677687dc
6 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@
"version": "1.0.0",
"license": "AGPL-3.0-only",
"devDependencies": {
"@simplewebauthn/typescript-types": "7.4.0",
"@simplewebauthn/types": "9.0.1",
"@types/autocannon": "^7.12.5",
"@types/chai": "^4.3.16",
"@types/cross-spawn": "^6.0.6",
+1 -1
View File
@@ -19,7 +19,7 @@
"@graphql-tools/schema": "^10.0.4",
"@hydrooj/framework": "workspace:^",
"@hydrooj/utils": "workspace:^",
"@simplewebauthn/server": "7.4.0",
"@simplewebauthn/server": "9.0.3",
"@undefined-moe/require-resolve-hook": "^1.1.0",
"adm-zip": "0.5.14",
"cac": "^6.7.14",
+1 -1
View File
@@ -288,7 +288,7 @@ class HomeSecurityHandler extends Handler {
@requireSudo
@param('type', Types.Range(['cross-platform', 'platform']))
async postRegister(domainId: string, type: 'cross-platform' | 'platform') {
const options = generateRegistrationOptions({
const options = await generateRegistrationOptions({
rpName: system.get('server.name'),
rpID: this.getAuthnHost(),
userID: this.user._id.toString(),
+1 -1
View File
@@ -131,7 +131,7 @@ class UserWebauthnHandler extends Handler {
const udoc = this.user._id ? this.user : ((await user.getByEmail(domainId, uname)) || await user.getByUname(domainId, uname));
if (!udoc._id) throw new UserNotFoundError(uname || 'user');
if (!udoc.authn) throw new AuthOperationError('authn', 'disabled');
const options = generateAuthenticationOptions({
const options = await generateAuthenticationOptions({
allowCredentials: udoc._authenticators.map((authenticator) => ({
id: authenticator.credentialID.buffer,
type: 'public-key',
+3 -3
View File
@@ -1,6 +1,6 @@
import type { AttestationFormat } from '@simplewebauthn/server/dist/helpers/decodeAttestationObject';
import type { AuthenticationExtensionsAuthenticatorOutputs } from '@simplewebauthn/server/dist/helpers/decodeAuthenticatorExtensions';
import { CredentialDeviceType } from '@simplewebauthn/typescript-types';
import type { AuthenticationExtensionsAuthenticatorOutputs } from '@simplewebauthn/server/esm/helpers/decodeAuthenticatorExtensions';
import type { AttestationFormat } from '@simplewebauthn/server/helpers';
import { CredentialDeviceType } from '@simplewebauthn/types';
import type fs from 'fs';
import type { Dictionary, NumericDictionary } from 'lodash';
import type { Binary, FindCursor, ObjectId } from 'mongodb';
+1 -1
View File
@@ -27,7 +27,7 @@
"@hydrooj/utils": "workspace:^",
"@sentry/browser": "^8.19.0",
"@sentry/webpack-plugin": "^2.21.1",
"@simplewebauthn/browser": "7.4.0",
"@simplewebauthn/browser": "9.0.1",
"@svgr/webpack": "^8.1.0",
"@types/gulp-if": "^0.0.34",
"@types/jquery": "^3.5.30",