fix(auth): verification rpid options

This commit is contained in:
Karol Sójko 2023-02-02 11:31:24 +01:00
parent 1c2fd46401
commit 989e1ce175
No known key found for this signature in database
GPG key ID: D966F68E8A92F649
5 changed files with 5 additions and 9 deletions

View file

@ -460,11 +460,7 @@ export class ContainerConfigLoader {
.toConstantValue(env.get('U2F_RELYING_PARTY_NAME', true) ?? 'Standard Notes')
container
.bind(TYPES.U2F_RELYING_PARTY_ID)
.toConstantValue(
env.get('U2F_RELYING_PARTY_ID', true)
? env.get('U2F_RELYING_PARTY_ID', true).split(',')
: ['standardnotes.com'],
)
.toConstantValue(env.get('U2F_RELYING_PARTY_ID', true) ?? 'standardnotes.com')
container
.bind(TYPES.U2F_EXPECTED_ORIGIN)
.toConstantValue(

View file

@ -16,7 +16,7 @@ describe('VerifyAuthenticatorAuthenticationResponse', () => {
new VerifyAuthenticatorAuthenticationResponse(
authenticatorRepository,
authenticatorChallengeRepository,
['standardnotes.com'],
'standardnotes.com',
['localhost', 'https://app.standardnotes.com'],
true,
)

View file

@ -10,7 +10,7 @@ export class VerifyAuthenticatorAuthenticationResponse implements UseCaseInterfa
constructor(
private authenticatorRepository: AuthenticatorRepositoryInterface,
private authenticatorChallengeRepository: AuthenticatorChallengeRepositoryInterface,
private relyingPartyId: string[],
private relyingPartyId: string,
private expectedOrigin: string[],
private requireUserVerification: boolean,
) {}

View file

@ -16,7 +16,7 @@ describe('VerifyAuthenticatorRegistrationResponse', () => {
new VerifyAuthenticatorRegistrationResponse(
authenticatorRepository,
authenticatorChallengeRepository,
['standardnotes.com'],
'standardnotes.com',
['localhost', 'https://app.standardnotes.com'],
true,
)

View file

@ -10,7 +10,7 @@ export class VerifyAuthenticatorRegistrationResponse implements UseCaseInterface
constructor(
private authenticatorRepository: AuthenticatorRepositoryInterface,
private authenticatorChallengeRepository: AuthenticatorChallengeRepositoryInterface,
private relyingPartyId: string[],
private relyingPartyId: string,
private expectedOrigin: string[],
private requireUserVerification: boolean,
) {}