authenticateWithTotp

abstract suspend fun authenticateWithTotp(context: Context, authenticatorId: String, token: String)

Authenticate the user with the TOTP token, only if the TOTP not added as a first factor authenticator. If the TOTP is added as a first factor authenticator, use the authenticate method to authenticate the user.

emit: AuthenticationState.Loading - The application is in the process of loading the authentication state

emit: AuthenticationState.Authenticated - The user is authenticated to access the application

emit: AuthenticationState.Unauthenticated - The user is not authenticated to access the application

emit: AuthenticationState.Error - An error occurred during the authentication process

Parameters

context

The context of the application

authenticatorId

The authenticator id of the selected authenticator

token

The TOTP token of the user