Next.js Discord

Discord Forum

Auth and Role based handling

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
i'm using a nextjs app for the frontend with a separated node server on the backend, i have an endpoint that i send the JWT token to the backend /account/info and i get back to it the user info if the token is valid, but i need a logic way to make this request only once and not always make it, just on the start of the application, and i want an interceptor for the refresh token when the response status is 401, how to make this in a nextjs app

0 Replies