mirror of
https://github.com/standardnotes/server
synced 2026-10-17 03:03:10 -04:00
feat(auth): add configurable user verification requirement on u2f via env vars
This commit is contained in:
+1
@@ -18,6 +18,7 @@ describe('VerifyAuthenticatorAuthenticationResponse', () => {
|
||||
authenticatorChallengeRepository,
|
||||
'standardnotes.com',
|
||||
'https://app.standardnotes.com',
|
||||
true,
|
||||
)
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+2
@@ -12,6 +12,7 @@ export class VerifyAuthenticatorAuthenticationResponse implements UseCaseInterfa
|
||||
private authenticatorChallengeRepository: AuthenticatorChallengeRepositoryInterface,
|
||||
private relyingPartyId: string,
|
||||
private expectedOrigin: string,
|
||||
private requireUserVerification: boolean,
|
||||
) {}
|
||||
|
||||
async execute(dto: VerifyAuthenticatorAuthenticationResponseDTO): Promise<Result<boolean>> {
|
||||
@@ -43,6 +44,7 @@ export class VerifyAuthenticatorAuthenticationResponse implements UseCaseInterfa
|
||||
expectedChallenge: authenticatorChallenge.props.challenge.toString(),
|
||||
expectedOrigin: this.expectedOrigin,
|
||||
expectedRPID: this.relyingPartyId,
|
||||
requireUserVerification: this.requireUserVerification,
|
||||
authenticator: {
|
||||
counter: authenticator.props.counter,
|
||||
credentialID: authenticator.props.credentialId,
|
||||
|
||||
Reference in New Issue
Block a user