Skip to main content

Function Signature

Description

A PortalAuth method. Completes a sign-in that handleRedirect returned as PortalTotpRequired, using the code from the user’s authenticator app. The session is persisted on the device before this returns. A wrong code doesn’t use up userJwt, so after AUTH_TOTP_REJECTED prompt again with the same userJwt. An expired userJwt is rejected the same way and can’t be refreshed: if codes keep being rejected, restart the sign-in. Available starting from portal_flutter 2.0.0.

Parameters

Returns

PortalAuthenticated - The completed sign-in, the same as the non-TOTP path of handleRedirect. Pass session to Portal().initialize(session:).

Example

Errors