socialLogin static method
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;
}