Class CredentialsManager

Properties

Auth0Module: Auth0Module
clientId: string
domain: string

Methods

  • Gets the credentials that has already been saved

    Parameters

    • Optional scope: string

      The scope to request for the access token. If null is passed, the previous scope will be kept.

    • minTtl: number = 0

      The minimum time in seconds that the access token should last before expiration.

    • parameters: Record<string, unknown> = {}

      Additional parameters to send in the request to refresh expired credentials.

    • forceRefresh: boolean = false

      Whether to force refresh the credentials. It will work only if the refresh token already exists. For iOS, doing forceRefresh will not send the scope. Since scope change already does force refresh, it is better to avoid force refresh if the scope is being changed.

    Returns Promise<Credentials>

    A populated instance of Credentials.

  • Returns whether this manager contains a valid non-expired pair of credentials.

    Parameters

    • minTtl: number = 0

      The minimum time in seconds that the access token should last before expiration

    Returns Promise<boolean>

    true if a valid set of credentials are available, or false if there are no credentials to return.

  • Enables Local Authentication (PIN, Biometric, Swipe etc) to get the credentials

    Parameters

    • Optional title: string

      the text to use as title in the authentication screen. Passing null will result in using the OS's default value in Android and "Please authenticate to continue" in iOS.

    • Optional description: string

      Android only: the text to use as description in the authentication screen. On some Android versions it might not be shown. Passing null will result in using the OS's default value.

    • Optional cancelTitle: string

      iOS only: the cancel message to display on the local authentication prompt.

    • Optional fallbackTitle: string

      iOS only: the fallback message to display on the local authentication prompt after a failed match.

    • strategy: LocalAuthenticationStrategy = LocalAuthenticationStrategy.deviceOwnerWithBiometrics

      iOS only: the evaluation policy to use when accessing the credentials. Defaults to LocalAuthenticationStrategy.deviceOwnerWithBiometrics.

    Returns Promise<void>

Generated using TypeDoc