Docs

SessionVerification

An interface that represents the state of the session verification process.

Properties

  • Name
    status
    Type
    'needs_first_factor' | 'needs_second_factor' | 'complete'
    Description

    The current state of the session verification.

  • Name
    level
    Type
    'first_factor' | 'second_factor' | 'multi_factor'
    Description

    The requested level of the session verification.

  • Name
    session
    Type
    Session
    Description

    The Session object that the session verification is attached to.

  • Name
    firstFactorVerification
    Type
    Verification
    Description

    The state of the verification process for the selected first factor. Initially, this property contains an empty Verification object, since there is no first factor selected. You need to call the prepareFirstFactorVerification() method in order to start the verification process.

  • Name
    secondFactorVerification
    Type
    Verification
    Description

    The state of the verification process for the selected second factor. Initially, this property contains an empty Verification object, since there is no second factor selected. For the phone_code strategy, you need to call the prepareSecondFactorVerification() method in order to start the verification process. For the totp or backup_code strategies, you can directly attempt the verification by calling the attemptSecondFactorVerification() method.

  • Name
    supportedFirstFactors
    Type
    EmailCodeFactor[] | PhoneCodeFactor[] | PasswordFactor[]
    Description

    Array of the first factors that are supported in the current session verification. Each factor contains information about the verification strategy that can be used.

  • Name
    supportedSecondFactors
    Type
    TOTPFactor[] | PhoneCodeFactor[] | BackupCodeFactor[]
    Description

    Array of the second factors that are supported in the current session verification. Each factor contains information about the verification strategy that can be used.

Feedback

What did you think of this content?

Last updated on