finishSocialAuthentication method

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

Implementation

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