Community maintained

Sample Project

Download a sample project specific to this tutorial configured with your Auth0 API Keys.

System Requirements
  • NodeJS 4.3
  • Phonegap 5.5
Show requirements

1. Setting up the callback URL in Auth0

Go to the Client Settings section in the Auth0 dashboard and make sure that Allowed Callback URLs contains the following value:


Also, if you are testing your application locally, make sure to add your local URL as an Allowed Callback URL and the following as an Allowed Origin (CORS):


2. Add InAppBrowser plugin

You must install the InAppBrowser plugin to be able to show the Login popup. For that, just run the following command:

phonegap plugin add cordova-plugin-inappbrowser

If you're using Phonegap Build service, you need to add the plugin using the <plugin name="cordova-plugin-inappbrowser" /> tag between the <widget> tags inside your config.xml file. Please check this phonegap guide for more information.

3. Follow the guide specific to the frontend technology you're using

Now, you can just follow the tutorial for the frontend technology that you're using. We currently support applications using jQuery, AngularJS and Vanilla JS.

Phonegap doesn't support getting dependencies from a CDN, so you're going to have to download the JS and CSS dependencies locally and then point to the downloaded files.

You must use popup mode when configuring an application with Phonegap (all available guides currently do that by default).

4. Sit back and relax

Now it's time to sit back, relax and open a beer. You've implemented Login and Signup with Auth0 and Phonegap.


Command failed with exit code 65 when running Phonegap build

This means that the InAppBrowser plugin wasn't installed successfully. Try any of the followings to fix this.

  • Reinstall the InAppBrowser plugin
phonegap plugin remove cordova-plugin-inappbrowser
phonegap plugin add cordova-plugin-inappbrowser
  • Remove the platform and re-add it


phonegap platform remove ios
phonegap platform add ios


phonegap platform remove android
phonegap platform add android
  • Copy the contents from the plugin to the platform plugins


cp plugins/cordova-plugin-inappbrowser/src/ios/* platforms/ios/[yourAppName]/Plugins/cordova-plugin-inappbrowser/


cp plugins/cordova-plugin-inappbrowser/src/android/* platforms/android/[yourAppName]/Plugins/cordova-plugin-inappbrowser/

Get a blank page with an OK after signin

This could mean that the InAppBrowser plugin wasn't installed successfully.

Get error We could not reach the server. Please try again

This means you need to install cordova-plugin-whitelist by running following command:

ionic plugin add cordova-plugin-whitelist

After that, configure your config.xml by adding or overriding following instructions:

<allow-navigation href="*" />
<access origin="*" />
Use Auth0 for FREECreate free Account