feat(core): Invalidate all sessions when MFA is enabled/disabled (#15524)

This commit is contained in:
Ricardo Espinoza
2025-05-21 02:59:22 -04:00
committed by GitHub
parent a1a33deee5
commit 2a35c19ef9
18 changed files with 92 additions and 76 deletions

View File

@@ -38,7 +38,7 @@ describe('UserService', () => {
});
type MaybeSensitiveProperties = Partial<
Pick<User, 'password' | 'updatedAt' | 'authIdentities'>
Pick<User, 'password' | 'updatedAt' | 'authIdentities' | 'mfaSecret' | 'mfaRecoveryCodes'>
>;
// to prevent typechecking from blocking assertions
@@ -47,6 +47,8 @@ describe('UserService', () => {
expect(publicUser.password).toBeUndefined();
expect(publicUser.updatedAt).toBeUndefined();
expect(publicUser.authIdentities).toBeUndefined();
expect(publicUser.mfaSecret).toBeUndefined();
expect(publicUser.mfaRecoveryCodes).toBeUndefined();
});
it('should add scopes if requested', async () => {