webauthn@8

This commit is contained in:
undefined committed 2023-09-20 05:52:16 +08:00
1 parent 1e3e797669
commit 58e9a8893b
9 files changed
+17 -17

No files matched your search

+4 -4
View File
@@ -27,7 +27,7 @@
"emoji-regex": "^10.2.1",
"emojis-list": "2.1.0",
"fs-extra": "^11.1.1",
"graphql": "^16.8.0",
"graphql": "^16.8.1",
"graphql-scalars": "^1.22.2",
"js-yaml": "^4.1.0",
"koa": "^2.14.2",
@@ -41,20 +41,20 @@
"mime-types": "^2.1.35",
"moment-timezone": "^0.5.43",
"mongodb": "^5.9.0",
"nanoid": "^4.0.2",
"nanoid": "^5.0.1",
"nodemailer": "^6.9.5",
"notp": "^2.0.3",
"p-queue": "^7.4.1",
"path-to-regexp": "^6.2.1",
"require-resolve-hook": "^1.1.0",
"saslprep": "^1.0.3",
"schemastery": "^3.12.0",
"schemastery": "^3.13.0",
"semver": "^7.5.4",
"serialize-javascript": "^6.0.1",
"superagent": "^8.1.2",
"tar": "^6.2.0",
"thirty-two": "^1.0.2",
"ws": "^8.14.1"
"ws": "^8.14.2"
},
"devDependencies": {
"@types/adm-zip": "^0.4.34",
+1 -1
View File
@@ -283,7 +283,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.request.hostname,
userID: this.user._id.toString(),
+1 -1
View File
@@ -172,7 +172,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',
+2 -2
View File
@@ -1,5 +1,5 @@
import { AttestationFormat } from '@simplewebauthn/server/dist/helpers/decodeAttestationObject';
import { AuthenticationExtensionsAuthenticatorOutputs } from '@simplewebauthn/server/dist/helpers/decodeAuthenticatorExtensions';
import { AttestationFormat } from '@simplewebauthn/server/script/helpers/decodeAttestationObject';
import { AuthenticationExtensionsAuthenticatorOutputs } from '@simplewebauthn/server/script/helpers/decodeAuthenticatorExtensions';
import { CredentialDeviceType } from '@simplewebauthn/typescript-types';
import type fs from 'fs';
import type { Dictionary, NumericDictionary } from 'lodash';