Hi All,
I am working on Xamarin.iOS for sign in with google.
I tried Xamarin.Auth OAuth2Authenticator
var Auth = new OAuth2Authenticator(
"720081367695-qqqqqq11111111ptmlura6bgde.apps.googleusercontent.com",
"2Am5qdd11111111111q8YP",
"email",
new Uri("https://accounts.google.com/o/oauth2/auth"),
new Uri("https://wwwww.net/oauth2callback"),
new Uri("https://www.googleapis.com/oauth2/v3/token")
);
//PresentViewController(auth.GetUI(), true, null);
Auth.Completed += async (sender, eventArgs) =>
{
DismissViewController(true, null);
if (eventArgs.IsAuthenticated)
{
//var request = new OAuth2Request("GET", new Uri(), null, eventArgs.Account);
//var response = await request.GetResponseAsync();
//var fbUser = JObject.Parse(response.GetResponseText());
//var id = fbUser["id"].ToString().Replace("\"", "");
//var name = fbUser["name"].ToString().Replace("\"", "");
//var email = fbUser["email"].ToString().Replace("\"", "");
//var success = await App.SocialLogin(id, name, email);
//if (success)
//{
// App.SuccessfulFacebookLoginAction();
//}
}
else
{
// App.CancelledFacebookLoginAction.Invoke();
}
};
// wasShown = true;
PresentViewController(Auth.GetUI(), true, null);
}
}
It is showing me disallowed_UserAgent . How to solve this problem
Please help me!!
Thank you