verifySoftwareToken method
This is used by an authenticated user trying to authenticate to verify a TOTP MFA
Implementation
Future<bool> verifySoftwareToken(
{required String totpCode, String? friendlyDeviceName}) async {
_signInUserSessionCheck();
try {
final data = await client!.request('VerifySoftwareToken', {
'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(),
'UserCode': totpCode,
'FriendlyDeviceName': friendlyDeviceName ?? 'My TOTP device',
});
return data['Status'] == 'SUCCESS';
} catch (err) {
return false;
}
}