socialLogin static method

Future<AuthResult> socialLogin(
  1. String type,
  2. String connId,
  3. String code
)

general social login method

Implementation

static Future<AuthResult> socialLogin(
    String type, String connId, String code) async {
  var body = jsonEncode({'connId': connId, 'code': code});
  final Result result =
      await post('/api/v2/ecConn/' + type + '/authByCode', body);
  AuthResult authResult = AuthResult(result);
  authResult.user = await createUser(result);
  return authResult;
}