react-native-auth0
    Preparing search index...

    Interface Auth0ContextInterface<TUser>

    interface Auth0ContextInterface<TUser extends User = User> {
        authorize: (
            parameters?: WebAuthorizeParameters,
            options?: WebAuthorizeOptions,
        ) => Promise<undefined | Credentials>;
        authorizeWithEmail: (
            parameters: LoginWithEmailOptions,
        ) => Promise<undefined | Credentials>;
        authorizeWithExchangeNativeSocial: (
            parameters: ExchangeNativeSocialOptions,
        ) => Promise<undefined | Credentials>;
        authorizeWithOOB: (
            parameters: LoginWithOOBOptions,
        ) => Promise<undefined | Credentials>;
        authorizeWithOTP: (
            parameters: LoginWithOTPOptions,
        ) => Promise<undefined | Credentials>;
        authorizeWithPasswordRealm: (
            parameters: PasswordRealmOptions,
        ) => Promise<undefined | Credentials>;
        authorizeWithRecoveryCode: (
            parameters: LoginWithRecoveryCodeOptions,
        ) => Promise<undefined | Credentials>;
        authorizeWithSMS: (
            parameters: LoginWithSMSOptions,
        ) => Promise<undefined | Credentials>;
        cancelWebAuth: () => Promise<void>;
        clearCredentials: () => Promise<void>;
        clearSession: (
            parameters?: ClearSessionParameters,
            options?: ClearSessionOptions,
        ) => Promise<void>;
        error: null | BaseError;
        getCredentials: (
            scope?: string,
            minTtl?: number,
            parameters?: Record<string, unknown>,
            forceRefresh?: boolean,
        ) => Promise<undefined | Credentials>;
        hasValidCredentials: (minTtl?: number) => Promise<boolean>;
        isLoading: boolean;
        resetPassword: (parameters: ResetPasswordOptions) => Promise<void>;
        revokeRefreshToken: (parameters: RevokeOptions) => Promise<void>;
        sendEmailCode: (parameters: PasswordlessWithEmailOptions) => Promise<void>;
        sendMultifactorChallenge: (
            parameters: MultifactorChallengeOptions,
        ) => Promise<void>;
        sendSMSCode: (parameters: PasswordlessWithSMSOptions) => Promise<void>;
        user: null | TUser;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    authorize: (
        parameters?: WebAuthorizeParameters,
        options?: WebAuthorizeOptions,
    ) => Promise<undefined | Credentials>

    Authorize the user using Auth0 Universal Login. See <a href="../classes/Types.WebAuth.html#authorize" class="tsd-kind-method">WebAuth#authorize</a>

    Type declaration

    authorizeWithEmail: (
        parameters: LoginWithEmailOptions,
    ) => Promise<undefined | Credentials>

    Authorize the user using an email code. See <a href="../classes/Types.Auth.html#loginwithemail" class="tsd-kind-method">Auth#loginWithEmail</a>

    authorizeWithExchangeNativeSocial: (
        parameters: ExchangeNativeSocialOptions,
    ) => Promise<undefined | Credentials>

    Authorize user with credentials using the Password Realm Grant. See <a href="../classes/Types.Auth.html#passwordrealm" class="tsd-kind-method">Auth#passwordRealm</a>

    authorizeWithOOB: (
        parameters: LoginWithOOBOptions,
    ) => Promise<undefined | Credentials>

    Authorize the user using an Out Of Band authentication code. See <a href="../classes/Types.Auth.html#loginwithoob" class="tsd-kind-method">Auth#loginWithOOB</a>

    authorizeWithOTP: (
        parameters: LoginWithOTPOptions,
    ) => Promise<undefined | Credentials>

    Autohrize the user using a One Time Password code. See <a href="../classes/Types.Auth.html#loginwithotp" class="tsd-kind-method">Auth#loginWithOTP</a>.

    authorizeWithPasswordRealm: (
        parameters: PasswordRealmOptions,
    ) => Promise<undefined | Credentials>

    Authorize user with credentials using the Password Realm Grant. See <a href="../classes/Types.Auth.html#passwordrealm" class="tsd-kind-method">Auth#passwordRealm</a>

    authorizeWithRecoveryCode: (
        parameters: LoginWithRecoveryCodeOptions,
    ) => Promise<undefined | Credentials>

    Authorize the user using a multi-factor authentication Recovery Code. See <a href="../classes/Types.Auth.html#loginwithrecoverycode" class="tsd-kind-method">Auth#loginWithRecoveryCode</a>

    authorizeWithSMS: (
        parameters: LoginWithSMSOptions,
    ) => Promise<undefined | Credentials>

    Authorize the user using a SMS code. See <a href="../classes/Types.Auth.html#loginwithsms" class="tsd-kind-method">Auth#loginWithSMS</a>

    cancelWebAuth: () => Promise<void>

    Cancel any ongoing Universal Login transaction. This works only on iOS and not on any other platforms

    clearCredentials: () => Promise<void>

    Clears the user's credentials without clearing their web session and logs them out.

    clearSession: (
        parameters?: ClearSessionParameters,
        options?: ClearSessionOptions,
    ) => Promise<void>

    Clears the user's web session, credentials and logs them out. See <a href="../classes/Types.WebAuth.html#clearsession" class="tsd-kind-method">WebAuth#clearSession</a>

    Type declaration

    error: null | BaseError

    An object representing the last exception

    getCredentials: (
        scope?: string,
        minTtl?: number,
        parameters?: Record<string, unknown>,
        forceRefresh?: boolean,
    ) => Promise<undefined | Credentials>

    Gets the user's credentials from the native credential store. If credentials have expired, they are automatically refreshed by default. See <a href="../classes/Types.CredentialsManager.html#getcredentials" class="tsd-kind-method">CredentialsManager#getCredentials</a>

    Type declaration

      • (
            scope?: string,
            minTtl?: number,
            parameters?: Record<string, unknown>,
            forceRefresh?: boolean,
        ): Promise<undefined | Credentials>
      • Parameters

        • Optionalscope: string

          The scopes used to get the credentials

        • OptionalminTtl: number

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

        • Optionalparameters: Record<string, unknown>

          Any additional parameters to send in the request to refresh expired credentials.

        • OptionalforceRefresh: boolean

          If true, credentials are always refreshed regardless of their expiry, provided a valid refresh token is available.

        Returns Promise<undefined | Credentials>

    hasValidCredentials: (minTtl?: number) => Promise<boolean>

    Whether the SDK currently holds valid, unexpired credentials.

    Type declaration

      • (minTtl?: number): Promise<boolean>
      • Parameters

        • OptionalminTtl: number

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

        Returns Promise<boolean>

        true if there are valid credentials. Otherwise, false.

    isLoading: boolean

    A flag that is true until the state knows that a user is either logged in or not

    resetPassword: (parameters: ResetPasswordOptions) => Promise<void>

    Request an email with instructions to change password of a user <a href="../classes/Types.Auth.html#resetpassword" class="tsd-kind-method">Auth#resetPassword</a>

    revokeRefreshToken: (parameters: RevokeOptions) => Promise<void>

    Revokes an issued refresh token. See <a href="../classes/Types.Auth.html#revoke" class="tsd-kind-method">Auth#revoke</a>

    sendEmailCode: (parameters: PasswordlessWithEmailOptions) => Promise<void>

    Start the passwordless email login flow. See <a href="../classes/Types.Auth.html#passwordlesswithemail" class="tsd-kind-method">Auth#passwordlessWithEmail</a>

    sendMultifactorChallenge: (
        parameters: MultifactorChallengeOptions,
    ) => Promise<void>

    Send a challenge for multi-factor authentication. See <a href="../classes/Types.Auth.html#multifactorchallenge" class="tsd-kind-method">Auth#multifactorChallenge</a>

    sendSMSCode: (parameters: PasswordlessWithSMSOptions) => Promise<void>

    Start the passwordless SMS login flow. See <a href="../classes/Types.Auth.html#passwordlesswithsms" class="tsd-kind-method">Auth#passwordlessWithSMS</a>

    user: null | TUser

    The user profile as decoded from the ID token after authentication