Auth0 Home Blog Docs

NestJS tutorial issues

I’m trying to get the updated version of these tutorial working:

To minimize human error on my part:

  • I’ve just cloned the sample code from GitHub instead of implementing the tutorial on my own.
  • I’ve replaced all domain and client specific configuration within both code samples to match my application settings on auth0 (domain, audience, and client ID in authentication.middleware.ts).

The following are issues that I’m experiencing:

  • Auth0 complained about no response from localhost:3000/. Consequently, I’ve ensured the API sample responds to GET on / root
  • The sample lists audience as ‘localhost:3000’. This results in a “Service not found error” until I looked at my API settings and updated the audience value to https://[mydomain].auth0.com/api/v2/. I was able to login successfully once.
  • Post successful login, now I am still seemingly unable to get a new token. Now the error message is ‘Login required’ Tracking 93846645bfdf6ba500cc

Did I miss something?