Skip to content

feat: support customizing profile and accessToken routes#2451

Merged
Piyush-85 merged 10 commits intoauth0:mainfrom
eliw00d:feat/custom-profile-and-access-token-routes
May 2, 2026
Merged

feat: support customizing profile and accessToken routes#2451
Piyush-85 merged 10 commits intoauth0:mainfrom
eliw00d:feat/custom-profile-and-access-token-routes

Conversation

@eliw00d
Copy link
Copy Markdown
Contributor

@eliw00d eliw00d commented Dec 9, 2025

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

📋 Changes

  • Update the RoutesOptions type definition
  • Update the functions that consume these routes (getAccessToken, useUser) to respect the programmatically configured routes
  • Update the documentation

📎 References

closes #2327

🎯 Testing

In an app that uses @auth0/nextjs-auth0, link to your local clone in the app's package.json as follows: "@auth0/nextjs-auth0": "file:path/to/nextjs-auth0", where path/to is your path to it.

I tested this with a local clone with an app that uses @auth0/nextjs-auth0 and everything works as expected.

Changes
---
- [x] Update the `RoutesOptions` type definition
- [x] Update the functions that consume these routes (getAccessToken, useUser) to respect the programmatically configured routes
- [x] Update the documentation
- [x] Added/updated tests

closes auth0#2327
Piyush-85
Piyush-85 previously approved these changes Apr 30, 2026
@Piyush-85
Copy link
Copy Markdown
Contributor

@eliw00d thanks for the contribution. Changes look good to be merged.
Could you please resolve the conflicts on this !
Will merge post that, thanks.

@eliw00d
Copy link
Copy Markdown
Contributor Author

eliw00d commented Apr 30, 2026

@Piyush-85 Absolutely! I'll get that up shortly.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.86%. Comparing base (c745513) to head (853e4df).

Files with missing lines Patch % Lines
src/client/index.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2451   +/-   ##
=======================================
  Coverage   89.85%   89.86%           
=======================================
  Files          68       68           
  Lines        8136     8140    +4     
  Branches     1744     1745    +1     
=======================================
+ Hits         7311     7315    +4     
  Misses        813      813           
  Partials       12       12           

☔ 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.

@Piyush-85 Piyush-85 merged commit ae91e05 into auth0:main May 2, 2026
8 of 9 checks passed
@Piyush-85 Piyush-85 mentioned this pull request May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow customization of /auth/access-token and /auth/profile URLs via Auth0ClientOptions

3 participants