I am trying to implement renewAuth for my SPA,
I tried implementing it myself, and I've also tried the example, both yielded the same results.
I have turned on "Use Auth0 instead of the IdP to do Single Sign On", and I've also turned on "OIDC Conformant" in my client settings.
I'm setting it up just like in https://github.com/auth0/auth0.js, and the parent is receiving the post message, except the response is always something like this: (this is the pure hash, sent directly after the callback)
.json
"#error=login_required&error_description=Login%20required&state=qszL6aE8sfqZy-od3YXHvRVbEoVv6mPC"
I am getting the same error with both my own project, and using the example code. Am I missing something? Why is renewAuth giving me this error?
The regular auth0.authorize is working, that triggers an authentication redirect to the auth0 hosted login page, and I also get the secondary permissions prompt on first login. And then it correctly redirects to the specified url where I'm successfully grabbing the access token.
I've looked through a lot of the docs, asked a question on the community page, but I still haven't figure out how to get it to work.
Thank you very much for your help!
Can you share a repro so we can validate? I just tested with our examples and it works as expected.
I did not see that one, I've tried this one https://github.com/auth0-samples/oidc-sso-sample and it doesn't work for me and I've followed all the steps. I will try out that one now though.
Update!: using this example, the renewAuth function DOES seem to work when logging in with email-password login only. The renewAuth command does not seem to be working when i log in using facebook or google.
And in my personal example, renewAuth works only with email-password login. Not with facebook or google login.
It won't work if you use Auth0 development keys for your social connections. You have to use your own keys.
Follow the steps for the provider you want here: https://auth0.com/docs/identityproviders
I have not done this yet and I will try it out. Thank you for helping me out with this!
Let me know if you find any issues 馃帀
Okay I've just set up both my social connections with my own keys. And silent authentication is now working for both, so my problem is solved馃槂馃槂馃槂 Thanks again Sir!!
For anyone else that stumbles across this while losing their mind trying to figure out why auth renewal still returns login_required when testing locally... make sure cookies are enabled. 馃槱
Most helpful comment
For anyone else that stumbles across this while losing their mind trying to figure out why auth renewal still returns
login_requiredwhen testing locally... make sure cookies are enabled. 馃槱