Methods

  • Authenticates using specified BI Universal passkey bound to the browser.

    Parameters

    • url: string

      The authentication URL of the current transaction.

    • passkeyId: string

      The ID of the passkey to authenticate with.

    Returns Promise<AuthenticateResponse>

    A promise that resolves to an AuthenticateResponse containing a redirect URL and a message.

    Will throw an error if the operation fails.

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

    A promise that resolves to an OtpChallengeResponse containing a URL with the state of the authentication.

    Will throw an error if the operation fails.

  • Binds a passkey to this browser.

    Parameters

    • url: string

      The URL to bind a passkey. This can either be a passkey binding link generated from a call to the Beyond Identity API or a passkey binding instruction from an email/sms.

    Returns Promise<BindPasskeyResponse>

    A promise that resolves to a BindPasskeyResponse containing the bound passkey and the post-binding redirect URI.

    Will throw an error if the operation fails.

  • Deletes a passkey from this browser.

    Parameters

    • id: string

      The ID of the passkey to be deleted.

    Returns Promise<void>

    A promise that resolves when the passkey is successfully deleted.

    Will throw an error if the operation fails.

  • Returns the Authentication Context for the current transaction. The Authentication Context contains the Authenticator Config, Authentication Method Configuration, request origin, and the authenticating application.

    Parameters

    • url: string

      The authentication URL of the current transaction.

    Returns Promise<AuthenticationContext>

    A promise that resolves to the Authentication Context.

  • Returns a list of all passkeys bound to this browser.

    Returns Promise<Passkey[]>

    A promise that resolves to a list of all passkeys bound to this browser.

    Will throw an error if the operation fails.

  • Checks if the given URL is an authenticate URL.

    Parameters

    • url: string

      The URL to be checked.

    Returns boolean

    Returns true if the URL is an authenticate URL, otherwise false.

    Will throw an error if the operation fails.

  • Checks if the given URL is a bind passkey URL.

    Parameters

    • url: string

      The URL to be checked. This can either be a passkey binding link generated from a call to the Beyond Identity API or a passkey binding instruction from an email/sms.

    Returns boolean

    Returns true if the URL is a bind passkey URL, otherwise false.

    Will throw an error if the operation fails.

  • Redeems an OTP for a grant code.

    Parameters

    • url: string

      The authentication URL of the current transaction.

    • otp: string

      The OTP to redeem.

    Returns Promise<AuthenticateResponse | OtpChallengeResponse>

    A promise that resolves to an AuthenticateResponse on success or an OtpChallengeResponse on failure.

    Will throw an error if the operation fails.

  • Updates all passkeys bound to this browser

    Returns Promise<void>

    A void promise that signifies success

    Will throw an error if the operation fails.

  • Initializes the Embedded SDK. This function must be called before any other function.

    Parameters

    • Optionalconfig: Config

      The optional configuration for the Embedded SDK.

    Returns Promise<Embedded>

    A promise that resolves to an instance of the Embedded SDK.

    Will throw an error if the operation fails.