finishSocialAuthentication method

  1. @override
Future<AuthResult> finishSocialAuthentication(
  1. String code
)
override

Implementation

@override
Future<AuthResult> finishSocialAuthentication(String code) async {
  try {
    final resultPromise = passage.finishSocialAuthentication(code);
    final jsObject = await js_util.promiseToFuture(resultPromise);
    return AuthResult.fromJson(jsObject);
  } catch (e) {
    throw PassageError.fromObject(
        object: e, overrideCode: PassageErrorCode.socialAuthError);
  }
}