feat: sign in setting refactor (#472)

* fix(auth): refactor setting names into domain core value objects

* fix(auth): refactor specs with setting name value objects

* feat(auth): move mute sign in emails to a subscription kind of setting

* feat(auth): add migration script to change sign in email settings to subscription settings

* chore: fix setting name usage

* fix(auth): upper casing setting names

---------

Co-authored-by: Karol Sójko <[email protected]>
This commit is contained in:
Karol Sójko
2023-03-08 10:22:27 +01:00
committed by GitHub
co-authored by Karol Sójko
parent ec0fb7e0b9
commit 27cf093f85
67 changed files with 1450 additions and 809 deletions
@@ -83,7 +83,7 @@ export class SignInWithRecoveryCodes implements UseCaseInterface<AuthResponse202
}
const recoveryCodesSetting = await this.settingService.findSettingWithDecryptedValue({
settingName: SettingName.RecoveryCodes,
settingName: SettingName.create(SettingName.NAMES.RecoveryCodes).getValue(),
userUuid: user.uuid,
})
if (!recoveryCodesSetting) {
@@ -116,7 +116,7 @@ export class SignInWithRecoveryCodes implements UseCaseInterface<AuthResponse202
}
await this.deleteSetting.execute({
settingName: SettingName.MfaSecret,
settingName: SettingName.NAMES.MfaSecret,
userUuid: user.uuid,
})