authenticateGoogle method
Authenticate Google credentials on backend
Implementation
Future<CkAuthResult<TProfile>> authenticateGoogle(
CkGoogleAuthData data,
) async {
if (_config?.google == null) {
return CkAuthResult<TProfile>.failure(
message: 'Google auth is not configured',
);
}
final gConfig = _config!.google!;
final body = gConfig.bodyBuilder(data);
final extractors =
gConfig.responseExtractors ?? _defaultExtractors;
return _executeSocialRequest(
url: gConfig.backendUrl,
method: gConfig.method,
body: body,
extractors: extractors,
);
}