Auth0 Authentication is not working as isAuthenticated is false after login

I have followed the instructions here:

  1. Ran yarn rw setup auth auth0
  2. Created a SPA Auth0 application
  3. Modified the env and redwood.toml

But after successful login in auth0, isAuthenticated remains false. I get no errors in the console and Auth0 dashboard shows successful logins.

Hey @sumitsinghv - would you mind putting a link to the repo? That way we can pull it down and run it to help debug. If you don’t want to share your code, would you mind making a new project following these steps and sharing that repo?



Hey @PantheRedEye ,
Thanks for the quick reply. I created a new project, followed the steps in the docs and its working. I didnt know that it would need access to graphql. I was using external apiGraphQLUrl in the dev environment which was not connecting (CORS probably), commented the line and it worked.

Is there a way I can manage this dynamically where redwood switches to graphql in the localhost instead of apiGraphQLUrl when in dev environment?

1 Like

So setting that var means that, even in dev, you are connecting to the external api? It does not sound like you desire this behavior. Is this correct?

Hopefully someone else that knows better than I do will hop in with a good answer. This does sounds like something we would want the framework to account for. If all that makes sense, how would you suggest thinking about it?

I’m guessing we can detect this somehow… either way it goes.


Yes, setting the var(apiGraphQLUrl ) in the dev environment is connecting to external api which I do not want.
Also, when I run yarn rw dev when apiGraphQLUrl is set, the console prints that GraphQL endpoint is at http://localhost:8911/graphql which is a bug. It should point to external api instead.

I have not worked in the configuration or module bundler yet but maybe this could be good opportunity. Will pick this up in few weeks if nobody picks it.

Better yet, would you mind submitting as an issue to the GitHub GitHub - redwoodjs/redwood: The App Framework for Startups? :pray: That way even if life happens and you don’t get back around to it, we have it more formally documented.

Sure, I have reported this bug here [Bug?]: console prints wrong GraphQL endpoint when apiGraphQLUrl is set in dev enviornment · Issue #10470 · redwoodjs/redwood · GitHub

1 Like