Override URL /api/auth/session when use JWT for session - improve performance. #1478
Labels
enhancement
New feature or request
stale
Did not receive any activity for 60 days
wontfix
This will not be worked on
Summary of proposed feature
Override URL
/api/auth/session
when use JWT for session. For example:My website: https://example.com is deployed on Vercel.
And I want to verify JWT session on URL: https://a.example.com/api/auth/session - use Cloudflare Worker
Purpose of proposed feature
This may be saved for users 200-400ms using Cloudflare Worker to verifying JWT - if their location is too far deployed server.
Related with:
API is slow when deploying to Vercel
#1432
vercel/next.js#22753
Use Cloudflare for Next-auth
#725 (comment)
As @iaincollins said, I want to use Cloudflare workers to read and validate a JWT. Currently, I used Cloudflare Workers for 2 APIs in my websites.
Detail about proposed feature
I checked this problem was implemented on auth0: https://github.com/auth0/nextjs-auth0/blob/c485044/src/frontend/use-user.tsx#L136
Potential problems
No.
Describe any alternatives you've considered
No.
Additional context
No.
Please indicate if you are willing and able to help implement the proposed feature.
I am using
next-auth
in my prod website.The text was updated successfully, but these errors were encountered: