Success Login and a Failed Exchange

I configured an API and application.
I have an angular app. I can login wit my user.
I see that in the logs (success login).
But than I have a Failed Exchange.
In the chrome dev tools, I see the following:

POST https://xxx.eu.auth0.com/oauth/token 401

hi @filip.debacker and thanks for reaching out to Auth0 Support!

Sounds like that error is related to your Authorization code flow not working as expected, here’s a list of our event type codes which may be useful.

You mentioned having an Angular application, is it modeled in Auth0 as a SPA or Regular Web Application (RWA)? For front end applications like that we recommend it being a SPA, in which case the Auth Code Flow is not recommended and should use the Implicit Flow, more on that here:

Please review those materials and if you’re still facing issues, could you please send me your tenant in a DM and I can review your setup further.

Best Regards,
Colin

Thanks for the info.
I’ve implemented the authorization like described in the Login and API sample. So that is the Implicit Flow.


I created a new Application, now I can login.
But when I check my token with jwt.io, I get a signature error due to padding.

Also, localhost works fine, no error in dev console.

On the prod server, I got an error:

ERROR NullInjectorError: StaticInjectorError[t -> t]:
StaticInjectorError(Platform: core)[t -> t]:
NullInjectorError: No provider for t!
at t.get (https://fdbapps.filipdebacker.be/main.da36deeb0148d50b543f.js:1:53846)

@colin.coutts I am getting the same error with my Angular SPA. I followed the https://auth0.com/blog/securing-angular-applications-with-auth0-and-deploying-to-netlify/ tutorial and I am also getting the FAILED EXCHANGE ERROR for both Google/Facebook Social Logins

{
  "date": "2020-08-13T08:12:55.226Z",
  "type": "feacft",
  "description": "Unauthorized",
  "connection_id": "",
  "client_id": "gNkJFP7YEvD4OrBdbgjHYZzM8XwkhjYS",
  "client_name": null,
  "ip": "116.86.21.67",
  "user_agent": "Safari 13.1.0 / Mac OS X 10.15.4",
  "details": {
    "code": "*************4s5"
  },
  "hostname": "vanna.au.auth0.com",
  "user_id": "",
  "user_name": "",
  "log_id": "90020200813081256620000465921382865527023048504050188338",
  "_id": "90020200813081256620000465921382865527023048504050188338",
  "isMobile": false
}

I am getting this error even after successful SignUp for Angular SPA https://vannatok.netlify.app/

I found the same issue with my react app today.
You can try this.

First, I created a new app setting.
Then I exported my settings, and compare it.
I found differences between old app and new app.
that differences are grant_types and token_endpoint_auth_method.