I tried to login from next.js (using docker image), and I followed this instruction(Auth0 Next.js SDK Quickstarts: Login).
However, the login operation doesn’t work. Log seems to say that Failed Exchange Error occured, and the request doesn’t contain client_id. When I send a request to login(http://localhost:3000/api/auth/login), login page appeared correctly, but after submitting the form
Rueben, thank you for your advice. I’ve already tried that way but it didn’t work. I also tried to change “Grant_types” to exclude “Client Credentials” (Success Login and a Failed Exchange - #9 by sagun786) but nothing happene
It is strange that this “Failed Exchange” always follows a “Success Login” log, and when I have “Success Login”, client_id works. It suggest that login part succeed but exchange part failed. The error on Google Chrome is this, and the code on […auth0].js is this. Please tell me if I can show any other information.
I have just looked carefully into the feacft log event type and found that this error happens when it failed to exchange the authorization code for a token.
I was able to reproduce this error when I passed incorrect values for either the client_id, client_secret, or domain in the request.
In this case, could you please make sure that you are exchanging your authorization code for a token with something like the following and making sure all the values are correct:
I really appreciate your great suppport, Rueben.
Actually I found my mistake and the problem solved. My AUTH0_SECRET is for another application and that cause this problem. Your generous support really helps me and makes me love auth0 more. Thanks a lot!