Auth0 Home Blog Docs

FailedExchange error when creating a sample Angular application using auth0-spa-js

Hi,

I am following the quickstart guide and trying to test a simple application. It seems that my app is failing in the callback during handleRedirectCallback(). The logs at the Auth0 site show two log messages:

Success Login
FailedExchange - with “description”: “Unauthorized”

I have checked that my client id and domain are correct.

I am able to get to the login page, enter the userid / password for the user I created. The error occurs when the control returns to my app.

Some other info:

If I use the curl command as per instructions, there is no problem.

Any idea what I should look at?

Thanks and Regards
Dibyendu

It seems that the problem might have been twofold.

  1. I was using an application that was generated when I created an api; this application was marked as type Machine to Machine.

  2. Secondly I was missing the ‘audience’ parameter in the auth service - because the instruction to add this parameter was in a subsequent section of the tutorial and I just missed it.

Regards

Thanks a lot for sharing it with the rest of community and glad you were able to figure it out!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.