Auth0 Home Blog Docs

auth0-cordova on iOS: Safari cannot open the page because the address is invalid

cordova
pkce
ionic2

#1

I’m trying to work around this issue: https://community.auth0.com/questions/542/lock-google-403-disallowed-useragent by converting my Ionic app to auth0-cordova.

I’m using the Ionic example application in the auth0-cordova project.

According to the Auth0 logs I’m able to successfully login. But I get the error:

Safari cannot open the page because the address is invalid

I’m assuming this has something to do with configuring custom urlscheme configuration?

I created this issue on GH with all the details: https://github.com/auth0/auth0-cordova/issues/38


#2

Yes, please someone at Auth0 help as I am also experiencing the same problem when using the iOS emulator. I’ve been battling on for nearly a month now first using Auth0-lock and now Auth0-cordova, the idea of Auth0 to make the process easier is not matching the reality. I may consider a switch to another provider soon.


#3

If you haven’t yet take a look at the resolution in the github issue I created. My problem was case sensitivity of the urlscheme. It must be all lower case.

You probably also have to uninstall the WKWebView plugin:
https://github.com/auth0/auth0-cordova/issues/42


#4

So the issue seems to be that the QuickStart mentions that the login01 sample application already has the CustomURLScheme setup correctly, but that's not the case. This becomes obvious when you review the cordova-plugin-customurlscheme plugin settings in package.json.

As gregor-srdic mentioned in another thread, you can fix it by removing and adding back the plugin:

ionic cordova plugin remove cordova-plugin-customurlscheme

ionic cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=YOUR_PACKAGE_ID


#5