Auth0 with Ionic using Webapp, Android and iOS

I’m not sure if this will help, but I had the similar problem with my Cordova app. See my original post here:

I’ve changed that flow a lot since June 1st, but the basic idea is the same.

I’m now using the cordova-plugin-safariviewcontroller plugin to launch what is essentially the same as “in app browser” to load my standard Auth0 login script via PHP on a web server. This plugin works on iOS and Android (on Android, it launches Chrome automatically). You can also test for it and if the plugin is not available in a regular web app, you can just use window.open() to open the same server based script to do the Auth0 login page, do the login, and pass the info back to the calling page.

It’s easier now that I don’t even need to use CUSTOM_URL_SCHEME as you can just control the safari-view-controller via javascript and close the window when the Auth0 login is complete.

I don’t know Ionic or Angular, but maybe this will help (since I know Ionic can use Cordova plugins).

So that’s how I do it for mobile and web apps using the same Auth0 login page.