I am trying to get Auth0 working in Browser using
ionic run browser
I have followed the guides from Auth0. I am using
auth0-7.6.1.min.js
lock/10.10.2/lock.min.js
versions. navigation to Google login page happens, but the callback is failing with blank white screen. by call back I mean loading the
https://n00b.au.auth0.com/login/callback?state=blahblahblah...
url. which loads a white html with JavaScript that throws exeption
Uncaught can't find relay frame
in these lines of code
onOpen: function(cb) {
var o = "*";
var msgTarget = isIE ? findRelay() : window.opener;
if (!msgTarget) throw "can't find relay frame";
clearly a global window.opener property was expected to exist. knowing that this whole URL is served by Auth0, I can't find a way to figure out what is wrong.
I have checked the logs in Auth0 and it is all green from their perspective and shows successful login.
Any Idea why this is failing?
UPDATE: tested on iPhone and iOS Emulator and both only show blank white screen. Downloaded sample Auth0 project and has this issue without any modification. My guess is that it has something to do with InApp Browser plugin of Cordova opening the login page in a new safari window
I'm currently having problems with the lock opening the registration link in the safari browser instead of in the InAppBrowser. This could be the thing that breaks the callback as it makes you completely switch application to Safari.
I made have a temporary workaround so the sign up link opens in the InAppBrowser, see => App rejected by Apple because Auth0 signUpLink doesn’t open in Cordova InAppBrowser but in system browser (Safari)
You could maybe apply this to your login links to have them open in the InAppBrowser as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With