Skip to main content
Version: 3.x

IonicAuthOptions

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

Properties

androidToolbarColor

  • Type: 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

  • Type: string

Provided audience (aud) value

authConfig

  • Type: auth0 | azure | cognito | identity-server | keycloak | okta | ping | salesforce | onelogin | general

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

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

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

clientID

  • Type: string

Provided Application ID

discoveryUrl

  • Type: string

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

implicitLogin

  • Type: 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

  • Type: private | shared | safari
  • private - Avoids the prompt but the session will only be shared with Safari on iOS 10 or lower.
  • 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.
  • safari - Will start authentication flow externally in the Safari browser.

logLevel

  • Type: DEBUG | ERROR | NONE

The log level for the module

logoutUrl

  • Type: string

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

platform

  • Type: web | cordova | capacitor

Are we hosted in cordova, web, capacitor

redirectUri

  • Type: string

Location that the hosting app expects callbacks to navigate to.

safariWebViewOptions

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

scope

  • Type: string

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

tokenStorageProvider

The type of storage to use for the tokens

webAuthFlow

  • Type: implicit | PKCE

Authentication flow to use on web defaults to: implicit