mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: upgrade webauthn lib (#847)
This commit is contained in:
1 parent
62613937cf
commit
a1677687dc
6 files changed
+8
-8
No files matched your search
@@ -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(),
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in new issue
Block a user