Making Auth0 work for grand-stack-starter-auth0-demo

auth

(Clement Sirvente) #1

I tried to fork the grand stack auth0 demo and run into an auth0 issue. Got the error "Error: GraphQL error: No authorization token." (JWT SECRET undefined). It is probably related to the Auth0 account configuration, some hints would e welcome.


(William Lyon) #3

Hi @clement.sirvente - I think I covered this in our Slack thread, but replying here so others who have the same problem can see this.

You'll need to set the JWT_SECRET environment variable so the JWT can be properly decoded and verified. I went ahead and checked in a .env file with the environment variables I used for the demo. Not a good idea in production, but I think it's fine for this demo. If you clone the repo again, it should run now that the environment variables specified in .env are set.

I also updated the readme here with more general information on how to set up the graphql-auth-directives.


(Clement Sirvente) #4

Thanks William, really helpful.

Just mind for those you try the demo that you may have to replace the default values Bookstore & Phoenix which are not in the seeds (so it doesn't show values or error).
Also for people wondering how to get the JWT_SECRET certificate, have a look in advanced settings of your Auth0 application.