verifyOtp method
Future<void>
verifyOtp({
- required String sessionId,
- required String otp,
- required OnSuccessCallback onSuccess,
- required OnErrorCallBack onError,
- OnProfileSelection? onProfileSelection,
Verify the OTP for sessionId.
On a single-profile account onSuccess fires with the session. When the phone
number maps to multiple profiles, onProfileSelection fires instead with the
list of UserProfiles to choose from — retain sessionId and otp and complete
login via the select-user step. If onProfileSelection is omitted, a multi-profile
account reports through onError.
Implementation
Future<void> verifyOtp({
required String sessionId,
required String otp,
required OnSuccessCallback onSuccess,
required OnErrorCallBack onError,
OnProfileSelection? onProfileSelection,
}) {
return _bridge.invoke(
'Extension.verifyOtp',
params: {'sessionId': sessionId, 'otp': otp},
callbacks: {
'onSuccess': onSuccess,
'onError': onError,
if (onProfileSelection != null) 'onProfileSelection': onProfileSelection,
},
);
}