Class CredentialsManager

Properties

Auth0Module: Auth0Module
clientId: string
domain: string
localAuthenticationOptions?: LocalAuthenticationOptions

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.