I am having problems building an app that can access google accounts. I have the following code that gets the sign in
page for google accounts and then the access permissions page is also displayed!
. Once i click on “Allow Access” the app is redirected to error page
. here are few screenshots so that whoever is trying to help can understand better.. and below is the code that am using
private void browseGoogle_Loaded(object sender, RoutedEventArgs e)
{
string address = "https://accounts.google.com/o/oauth2/auth" +
"?client_id=" + "*******.apps.googleusercontent.com" +
"&scope=" + "https://www.googleapis.com/auth/plus.me" +
"&response_type=code" +
"&redirect_uri=" + "https://www.****.com/oauth2callback";
browseGoogle.Navigate(new Uri(address, UriKind.Absolute));
}
https://accounts.google.com/o/oauth2/approval?as=634f855389bf10ff&hl=en_GB&xsrfsign=APsBz4gAAAAAUHZvwB3xTqisyv8hEcWem5X3eKvwAHN9
this is the URI its navigating to after allow access is selected/clicked. What does this mean?
This is all am doing. My BrowserNavigated Method doesn’t contain any code as of now. I dunno what to do further.hence seeking help.
Please help me resolve this issue.. All answers and suggestion appreciated.
The XAML goes like this
My mistakes were two:-
1) as vignesh has mentioned in his comments I was using a wrong Redirect URI.
2)IsScriptEnabled was not at all set in my Web Browser Controls. Once i set it true everything was fine.