resume

suspend fun resume(secondaryFactor: SecondaryFactor, challengeTypesSupported: List<ChallengeGrantType> = listOf(WebAuthnMfa, OobMfa, OtpMfa)): DirectAuthenticationState

Continues the multi-factor authentication (MFA) flow using the specified secondary factor.

This function handles the next step in the MFA process based on the provided SecondaryFactor.

  • For factors like PrimaryFactor.Otp, where the user provides a code directly, this function attempts to exchange the passcode for tokens without an additional challenge step.

  • For factors that require an interactive challenge, such as PrimaryFactor.Oob or PrimaryFactor.WebAuthn, this function will first initiate that challenge.

Return

The next DirectAuthenticationState in the flow, which could be Authenticated, AuthorizationPending, or an error state.

Parameters

secondaryFactor

The SecondaryFactor to use for authentication, which may include user input like a one-time passcode.

challengeTypesSupported

A list of ChallengeGrantTypes the client supports for MFA, such as OobMfa, OtpMfa, and WebAuthnMfa. This is used when a new challenge is required.