oneTimePasscodeActivate method
Implementation
@override
Future<AuthResult> oneTimePasscodeActivate(String otp, String otpId) async {
try {
final resultPromise = passage.oneTimePasscodeActivate(otp, otpId);
final jsObject = await js_util.promiseToFuture(resultPromise);
return AuthResult.fromJson(jsObject);
} catch (e) {
final overrideCode = e.toString().contains('exceeded number of attempts')
? PassageErrorCode.otpActivationExceededAttempts
: PassageErrorCode.otpError;
throw PassageError.fromObject(object: e, overrideCode: overrideCode);
}
}