checkSession() + electron + auth0js


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 “” 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 you need to add the following to allowed web origings . 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 redirect_uri.

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 :rofl:). 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 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

1 Like

Thanks for sharing @Serv!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.