I am trying to use Auth0 for my react app, I did the basic configurations as given in the get started pages and sample code. I am able to login, but I often get the 400 error for the /authorize endpoint as well as “Could not get a new token (timeout: Timeout during executing web_message communication).” error while I try to renew the token.
Check for any missing parameters (declared below) .
Are you generating the URL yourself or through some service?
Is this happening a lot of times ?
If yes ,
Can you share the technical details panel in the page (redacted).
You can go to Dashboard → Logs , and see the details there .
As per my understanding the /authorise ,must have : client_id= SOME_CLIENT_ID response_type= token%20id_token redirect_uri= http://localhost:9090/callback scope= openid%20email%20profile nonce= test auth0Client= eyJuYW1lIjoiYXV0aDAuanMiLCJ2ZXJzaW9uIjoiOS4xMC4yIn0%3D
What data you got on the 302-http-response to “localhost:3000/callback” ?(is it the same error ,error desc.)
can you share the logs /technical details .
Open Network-tab ( in developer mode/ F12)
In " Request URL:https://example.auth0.com/u/login?…". -with a 302 http
you must be getting Response headers " . what is the value of location key.?
Hi @vishwasnavadak,
Your code was running succesfully.
I was able to login via both google and username-password .
The config I used in Auth.js …
auth0 = new auth0.WebAuth({
domain: “example.auth0.com”,
clientID: “CLIENT_ID”,
redirectUri: “http://localhost:3000/callback”,
responseType: “token id_token”,
scope: “openid email profile”
});
Hi, The login is working for me as well. the /authorize error I am getting is after the login and the token gets lost after the expiry time instead of getting renewed. Hence logging me out of the page.
Are you trying to log-in using username-pwd or google-oauth ?
I have incorporated some change in github-code , can you run that one ?
I have commented the “this.scheduleRenewal()” and certain params from "auth0 = new auth0.WebAuth({… " in Auth.js.
I am using google-oauth. I tried putting the patch you gave. The result is still the same.
I have configured the callback in the auth0 dashboard as well.
The /authorize gets called multiple times. Once the login is success and comes back to the logged in page of my application, /authorize throws error 400. I have put the screencast in http://ge.tt/4PHD8uv2 .
Hi @vishwasnavadak ,
The 400 you are getting is beacuse of " renewSession() call" in dashboard.js, comment that one out till you truly understand the flow of Auth0. It’s not very chaotic.