Skip to main content
Version: 4.0

Installation

Don't have an Auth Connect subscription? Try it free now.

Follow these steps to install Auth Connect into your app.

Installation

If you have no already setup Ionic Enterprise in your app, follow the one-time setup steps.

Next, install the plugin:

Capacitor


_10
npm install @ionic-enterprise/auth@4
_10
npx cap sync

Custom URL Scheme

Next you will need to manually update the native project config files.

For Android, update the build.gradle file located at android/app/build.gradle by adding the following code to the android/defaultConfig block:


_10
android {
_10
...
_10
defaultConfig {
_10
...
_10
manifestPlaceholders = [
_10
'AUTH_URL_SCHEME': 'mycustomscheme' /// CHANGE THIS TO YOUR CUSTOM AUTH SCHEME
_10
]
_10
}
_10
}

For iOS, update the file located at ios/App/App/Info.plist by adding the following inside the existing CFBundleURLTypes node:


_10
<dict>
_10
<key>CFBundleURLSchemes</key>
_10
<array>
_10
<string>$AUTH_URL_SCHEME</string>
_10
</array>
_10
</dict>

Cordova


_10
ionic cordova plugin add @capacitor/plugin-cordova-compat
_10
ionic cordova plugin add @ionic-enterprise/auth@4 --variable AUTH_URL_SCHEME='mycustomscheme'

Custom URL Scheme Naming Consideration​

It is recommended to replace $AUTH_URL_SCHEME with your application's bundle id (com.company.myapp), or another value unique from other custom URL schemes (such as myapp://) registered with your app.

This prevents plugins that handle deep linking from intercepting callbacks made by authentication providers that Auth Connect relies on to complete login/logout functionality.