hostedAuthFinish method
Implementation
@override
Future<AuthResult> hostedAuthFinish(String code, String state) async {
if (Platform.isIOS) {
throw PassageError(
code: PassageErrorCode.hostedAuthFinish,
message: 'Not supported on iOS. Use hostedAuthIOS instead.');
}
try {
final Map<Object?, Object?>? result = await methodChannel.invokeMethod<Map<Object?, Object?>>(
'hostedAuthFinish',
{'code': code, 'state': state},
);
final authResult = AuthResult.fromJson(result!['authResult']);
return authResult;
} catch (e) {
throw PassageError.fromObject(object: e);
}
}