Skip to main content
Version: 3.x

Interface: IonicAuthOptions

Provided by the hosting app, this interface allows the hosting app to configure, and provide information needed to login, logout.

Table of contents#

Properties#

Properties#

androidToolbarColor#

Optional androidToolbarColor: string

setting to allow the toolbar color of the android webview control to be set. Takes a string that can be parsed as a color by android.graphics.Color.parseColor


audience#

Optional audience: string

Provided audience (aud) value


authConfig#

Optional authConfig: auth0 | azure | cognito | salesforce | okta | ping | identity-server | keycloak | onelogin | general

The type of the Auth Server, currently only the following are supported:

  • Auth0
  • Azure Active Directory
  • Cognito (AWS)
  • Identity Server
  • Keycloak
  • Okta
  • Ping
  • Salesforce
  • OneLogin

'general' is deprecated--please use a specific provider.


clientID#

clientID: string

Provided Application ID


clientSecret#

Optional clientSecret: string

The client secret, optional


discoveryUrl#

Optional discoveryUrl: string

Location of the Auth Server's discovery endpoint, can be null for Azure


implicitLogin#

Optional implicitLogin: CURRENT | POPUP

determines the UI mode to use with web authentication in implicit. "CURRENT" will replace the current window with the authentication provider, and "POPUP" will open the authentication provider in a new window/tab. When this is set to "CURRENT", you will need to use the handleLoginCallback and handleLogoutCallback to complete the auth


iosWebView#

Optional iosWebView: private | shared | safari

shared - Allows for sharing a session between Safari and other applications for a true SSO experience between apps but on iOS 11 and higher it will prompt the user for permission to share the website data with the application.

  • private - Avoids the prompt but the session will only be shared with Safari on iOS 10 or lower.
  • safari - Will start authentication flow externally in the Safari browser.

logLevel#

Optional logLevel: DEBUG | ERROR | NONE

The log level for the module


logoutUrl#

logoutUrl: string

Location that the hosting app expects logout callbacks to navigate to.


platform#

Optional platform: web | cordova | capacitor

Are we hosted in cordova, web, capacitor


redirectUri#

Optional redirectUri: string

Location that the hosting app expects callbacks to navigate to.


safariWebViewOptions#

Optional safariWebViewOptions: ISafariWebViewOptions

Additional configuration options to pass to the Safari Web View when iosWebView is set to "private".


scope#

Optional scope: string

User details requested from the Authentication provider, each provider may support standard {e.g. openid, profile, email, etc.}, or custom scopes.


tokenStorageProvider#

Optional tokenStorageProvider: localStorage | TokenStorageProvider | IVUserInterface

The type of storage to use for the tokens


webAuthFlow#

Optional webAuthFlow: implicit | PKCE

Authentication flow to use on web defaults to: implicit