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

+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',