I’ve got an Electron app with AngularJs that logs in with a custom login page, this all works well no problems. But I run into a problem when I call checkSession() i get a response with the following error description. “The specified redirect_uri ‘undefined’ does not have a registered origin.”
I followed the code here “https://github.com/auth0-samples/auth0-angularjs-samples/tree/embedded-login/02-Custom-Login-Form” with some minor changes.
I don’t set “redirect_uri” anywhere, as I dont require any redirect.
How can I get this to work?
Hey @Serv, I apologize for the delay in response.
One of our senior engineers touched on the
The specified redirect_uri ‘X’ does not have a registered origin issue before and said it best in the below words.
Based on the information you shared the issue is that you set the exact same URI in Allowed Web Origins setting and that setting expects a web origin.
In conclusion, for an application URL of
https://app.example.com/ you need to add the following to allowed web origings
https://app.example.com . Notice that the web origin contains only scheme, host and port (it technically does not contain port in this case because it uses the default one for that scheme); the important part is that there is no path component, in particular, no
/ at the end .
Also here’s documentation we have related to redirecting users after login which dives into
I know it’s been some time since you posted this but I will keep this topic open for 10 days just in case you have any additional questions related to this subject. Thanks!
Thanks for the reply (event a year later ). I know understand all this a bit better and the problem was around trying to renew my tokens for my app. To get around this I just silently logged the user in again and got new tokens for API auth etc. Once you guys have updated electronjs docs I will look into changing the way this is handled.
Do you have an ETA on when those docs will be available?
I would be happy to pass your feedback to the docs team, can you share some more details on this front @Serv? Thanks!
Unfortunately being over a year ago I can’t remember what code I used so elaborate. What I can remember was I upgraded to the latest version of Auth0 so couldn’t use the “angularAuth0.getDelegationToken” function anymore and was following this guide https://auth0.com/docs/quickstart/spa/angularjs/05-token-renewal to update my electronjs + angularjs application but was unable to get the “angularAuth0.checkSession” function to work (see OP).
We’re using a custom login so dont have a callbackUri which caused “angularAuth0.checkSession” to not work. Until there are proper electronjs docs the current method will have to do. Possibly could look at tying into the https://auth0.com/docs/auth-api.
Thanks for sharing @Serv!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.