Skip to content

feat(core): add mfa query keys into core#267

Merged
NaveenChand755 merged 1 commit intomainfrom
feat/refactor-core-for-usermfa
May 8, 2026
Merged

feat(core): add mfa query keys into core#267
NaveenChand755 merged 1 commit intomainfrom
feat/refactor-core-for-usermfa

Conversation

@NaveenChand755
Copy link
Copy Markdown
Contributor

@NaveenChand755 NaveenChand755 commented May 5, 2026

Summary
Adds mfaQueryKeys to the core package so TanStack Query cache keys for MFA factors are defined alongside other MFA constants rather than in the React layer.

Why
Query keys are domain constants, not UI concerns. Keeping them in @auth0/universal-components-core next to the MFA factor type constants makes them reusable across any consumer and keeps the React hooks free of hardcoded cache key definitions.

What
Added mfaQueryKeys to packages/core/src/services/my-account/mfa/mfa-constants.ts
Exported mfaQueryKeys from packages/core/src/index.ts

Packages

  • packages/core
  • packages/react
  • examples

References

Testing

How can this be verified? Note anything intentionally not covered by tests and why.

  • This change adds unit test coverage
  • Tested for both SPA and RWA flows, all example apps working
  • All existing and new tests complete without errors

Checklist

  • Breaking change
  • Requires docs update
  • Backward compatible

Contributing

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.42%. Comparing base (c1fa8fd) to head (7f720a1).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #267   +/-   ##
=======================================
  Coverage   89.42%   89.42%           
=======================================
  Files         159      159           
  Lines       13325    13329    +4     
  Branches     1357     1435   +78     
=======================================
+ Hits        11916    11920    +4     
  Misses       1409     1409           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NaveenChand755 NaveenChand755 added the refactor Restructuring existing code and logic to reduce technical debt and improve quality label May 7, 2026
@NaveenChand755 NaveenChand755 merged commit f93136c into main May 8, 2026
6 checks passed
@NaveenChand755 NaveenChand755 deleted the feat/refactor-core-for-usermfa branch May 8, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructuring existing code and logic to reduce technical debt and improve quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants