I am trying to figure out how to protect my api and make requests from react native using a nextjs application as server.
So what I tested so far:
→ Auth0 with nextjs using cookies: All good.
→ Auth0 withApiAuth to protect routes: All good.
→ Auth0 withSsr: all good.
- So far I have the access_token issued from react native and I need it in my nextjs api route to verify the access_token get the user details and continue. How can I do that?
If I could resolve this issue, then my custom function would work with both jwt and cookies depending on the origin of the request.