1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

[PM-3936] [PM-4174] Update authenticator selection options (#3340)

* [PM-3936] [PM-4174] feat: update `UserVerificationRequirement` and `requireResidentKey`

* [PM-3936] fix: lint
This commit is contained in:
Andreas Coroiu 2023-11-10 11:27:55 +01:00 committed by GitHub
parent 72a6bb6f64
commit 627f4ffa39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -540,8 +540,8 @@ public class UserService : UserManager<User>, IUserService, IDisposable
var authenticatorSelection = new AuthenticatorSelection var authenticatorSelection = new AuthenticatorSelection
{ {
AuthenticatorAttachment = null, AuthenticatorAttachment = null,
RequireResidentKey = false, // TODO: This is using the old residentKey selection variant, we need to update our lib so that we can set this to preferred RequireResidentKey = true,
UserVerification = UserVerificationRequirement.Preferred UserVerification = UserVerificationRequirement.Required
}; };
var extensions = new AuthenticationExtensionsClientInputs { }; var extensions = new AuthenticationExtensionsClientInputs { };
@ -604,7 +604,7 @@ public class UserService : UserManager<User>, IUserService, IDisposable
{ {
UserVerificationMethod = true UserVerificationMethod = true
}; };
var options = _fido2.GetAssertionOptions(existingCredentials, UserVerificationRequirement.Preferred, exts); var options = _fido2.GetAssertionOptions(existingCredentials, UserVerificationRequirement.Required, exts);
// TODO: temp save options to user record somehow // TODO: temp save options to user record somehow