Hello,
I am struggling with calling my external back-end API with a Auth0 Bearer token for authentication.
I found this post about the same thing
, but this post is about the react SDK and I’m using the NextJs SDK
I also created a StackOverflow post about this
Feel free to help me out
Thankyou!
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