Skip to content

Commit f93136c

Browse files
Merge pull request #267 from auth0/feat/refactor-core-for-usermfa
feat(core): add mfa query keys into core
2 parents 5cd929a + 7f720a1 commit f93136c

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export {
4141
FACTOR_TYPE_RECOVERY_CODE,
4242
FACTOR_TYPE_WEBAUTHN_ROAMING,
4343
FACTOR_TYPE_WEBAUTHN_PLATFORM,
44+
mfaQueryKeys,
4445
} from './services/my-account/mfa/mfa-constants';
4546

4647
export * from './types';

packages/core/src/services/my-account/mfa/mfa-constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ export const FACTOR_TYPE_RECOVERY_CODE = 'recovery-code';
1818
export const FACTOR_TYPE_WEBAUTHN_ROAMING = 'webauthn-roaming';
1919
/** @internal */
2020
export const FACTOR_TYPE_WEBAUTHN_PLATFORM = 'webauthn-platform';
21+
22+
export const mfaQueryKeys = {
23+
all: ['mfa'] as const,
24+
factors: (onlyActive: boolean) => [...mfaQueryKeys.all, 'factors', { onlyActive }] as const,
25+
};

0 commit comments

Comments
 (0)