@beyondidentity/bi-sdk-react-native
    Preparing search index...

    Interface Embedded

    interface Embedded {
        logEventEmitter: BILoggerEmitter;
        authenticate(url: string, passkeyId: string): Promise<AuthenticateResponse>;
        authenticateOtp(url: string, email: string): Promise<OtpChallengeResponse>;
        bindPasskey(url: string): Promise<BindPasskeyResponse>;
        deletePasskey(id: string): Promise<string>;
        getAuthenticationContext(url: string): Promise<AuthenticationContext>;
        getPasskeys(): Promise<Passkey[]>;
        initialize(
            biometricAskPrompt: string,
            allowedDomains?: string[],
        ): Promise<"success">;
        isAuthenticateUrl(url: string): Promise<boolean>;
        isBindPasskeyUrl(url: string): Promise<boolean>;
        redeemOtp(
            url: string,
            otp: string,
        ): Promise<AuthenticateResponse | OtpChallengeResponse>;
    }
    Index

    Properties

    logEventEmitter: BILoggerEmitter

    A NativeEventEmitter to listen for Logger events after calling Embedded.initialize

    Methods

    • Authenticate a user and receive an AuthenticateResponse.

      Parameters

      • url: string

        The authentication URL of the current transaction.

      • passkeyId: string

        the ID of the passkey with which to authenticate.

      Returns Promise<AuthenticateResponse>

    • Initiates authentication using an OTP, which will be sent to the provided email address.

      Parameters

      • url: string

        The authentication URL of the current transaction.

      • email: string

        The email address where the OTP will be sent.

      Returns Promise<OtpChallengeResponse>

    • Delete a passkey by ID.

      Parameters

      • id: string

        the the passkey id, uniquely identifying a Passkey.

      Returns Promise<string>

      it is possible to delete a passkey that does not exist.

      deleting a passkey is destructive and will remove everything from the device. If no other device contains the passkey then the user will need to complete a recovery in order to log in again on this device.

    • Get the Authentication Context for the current transaction.

      The Authentication Context contains the Authenticator Config, Authentication Method Configuration, request origin, and the authenticating application. This is used to retrieve authentication parameters for an ongoing transaction.

      Parameters

      • url: string

        The authentication URL of the current transaction.

      Returns Promise<AuthenticationContext>

    • Initialize the SDK. This must be called before any other functions are called. Note: Hot reloading will not call this function again. If changes have been made to calling this function, fully reload the app to see those changes.

      Parameters

      • biometricAskPrompt: string

        A prompt the user will see when asked for biometrics.

      • OptionalallowedDomains: string[]

        An optional array of whitelisted domains for network operations. This will default to Beyond Identity’s allowed domains when not provided or is empty.

      Returns Promise<"success">

    • Returns whether a URL is a valid Authenticate URL or not.

      Parameters

      • url: string

        The URL in question.

      Returns Promise<boolean>

    • Returns whether a URL is a valid Bind Passkey URL or not.

      Parameters

      • url: string

        The URL in question.

      Returns Promise<boolean>

    • Redeems an OTP for a grant code.

      Returns a promise that resolves to an AuthenticateResponse on success or an OtpChallengeResponse on failure to authenticate with the provided OTP code. Use the url provided in OtpChallengeResponse for retry.

      Parameters

      • url: string

        The authentication URL of the current transaction.

      • otp: string

        The OTP to redeem.

      Returns Promise<AuthenticateResponse | OtpChallengeResponse>