getTOTP

public abstract AsyncOperation<TOTP> getTOTP(String userId, SDKAuthMode mode)

Create the 6 digit code used in the TOTP offline authentication, for the provided user id.

Operation can be protected depending on the input.

Return

the current 6 digit used in the TOTP offline authentication, for the provided user id.

Parameters

userId

the Futurae account's user id.

mode

Depending on this parameter operation may be protected (require prior SDK unlock). If mode is SDKAuthMode.Unlock, then operation would require prior unlock. For SDK_PIN_WITH_BIOMETRICS_OPTIONAL, mode should be SDKAuthMode.PinOrBiometrics.

See also

Throws

if the SDK is configured with a LockConfigurationType other than SDK_PIN_WITH_BIOMETRICS_OPTIONAL while attempting to get a TOTP with biometric authentication

if the SDK is unable to retrieve the encrypted SDK pin. Applies only to LockConfigurationType.SDK_PIN_WITH_BIOMETRICS_OPTIONAL while attempting to get a TOTP with biometric authentication

if the SDK cannot find the user account for the provided user-id.

if the biometrics verification fails.

if the SDK cannot access necessary cryptographic material or perform cryptographic operations

if the SDK is locked.