Just to be clear, I want to send a API request to my back-end secured by Auth0 and automatically add the Bearer token to every request in the frontend.
I should probably doing something with Axios interceptor or custom hook but I need the req
and res
variables for the getAccessToken from @auth0/nextjs-auth
. I mentioned the other article about this problem, But he is using the React SDK where you don’t need the req
and res
and call getAccessTokenSilently
which I think is removed in the NextJS SDK