Marks in the AuthenticationSession that AuthenticationStepName.TWO_FACTOR_AUTH_CHECK step has been passed (in case valid token is sent by client), and authentication can be finished.
Generates totp secret and stores it into account. After that method will generate a QR Image containing secret and return it's URL to client.
Marks in the AuthenticationSession that AuthenticationStepName.GENERATE_2FA_TOKEN has been passed,
and the next step is to validate token from the Authenticator App sent by client.
An attempt to come back to AuthenticationStepName.GENERATE_2FA_TOKEN step until previous token validation
will result into an error.
Two factor authentication strategy which uses TOTP mechanism.
When 2fa is enabled, the strategy will generate a secret, which will be sent to client as QR Image Code (see OnTwoFactorEnabledHookResult.totpSecretQRImageUrl). Client has to scan this image with his Authenticator App.
During authentication process, when client will receive AuthenticationStepName.TWO_FACTOR_AUTH_CHECK as AuthenticationStatus.nextStep, he needs to send back 2fa token generated by his app to complete authentication.