Now that we have already created our app in the Auth0 dashboard, it's time to write the code for it. Take the following steps:
- Now, create a new MySimpleAuth app using the blank template, as shown in the following code, and go to the MySimpleAuth folder:
$ ionic start MySimpleAuth blank$ cd MySimpleAuth
- Install auth0.js and auth0/cordova npm packages, which are required for Auth0 authentication:
$ npm install auth0-js @auth0/cordova --save
- We also need to install the following Cordova plugin:
$ ionic cordova plugin add cordova-plugin-safariviewcontroller$ ionic cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_HOST={YOUR_DOMAIN} ...