You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Guys, I am currently working on building a multi-vendor web app with next-js as the client, auth0 as the authentication and authorization provider and Apollo graphQL server for my API/data-layer.
Issue -
I am having difficulties in accessing the users access token to send it along any api request via authorization headers for user authorization on Apollo server.
Any help is appreciated.
The text was updated successfully, but these errors were encountered:
Hello @adamjmcgrath thanks for getting back to me on this, I am literally going crazy on this I have search endlessly for a solution to the problem.
I have implemented the suggestions made on these threads about having a next api to get the access token and then invoke it to get an access token to pass it as authorization header. These are the issues I am facing currently -
If the API route is secured with withApiAuthRequired I can't access it even when user is login.
If the API route is not protected I get an error " AccessTokenError - user does not have a valid session ".
I would really appreciate it if you could help me with these issue I would be even happy to hop on a call with you if you are available. I am in desperate need.
Code Snippet -
import auth0 from '../../utils/auth0';
export default auth0.withApiAuthRequired(async function requestAccessToken(req, res) {
try {
Hi Guys, I am currently working on building a multi-vendor web app with next-js as the client, auth0 as the authentication and authorization provider and Apollo graphQL server for my API/data-layer.
Issue -
I am having difficulties in accessing the users access token to send it along any api request via authorization headers for user authorization on Apollo server.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: