Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8682723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:51:06+00:00 2026-06-12T21:51:06+00:00

I am having problems building an app that can access google accounts. I have

  • 0

I am having problems building an app that can access google accounts. I have the following code that gets the sign in Signin Page page for google accounts and then the access permissions page is also displayed!enter image description here. Once i click on “Allow Access” the app is redirected to error pageError. 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:51:07+00:00Added an answer on June 12, 2026 at 9:51 pm
     private void browseGoogle_Loaded(object sender, RoutedEventArgs e)
        { 
            try
            {
                StringBuilder autheticateURL = new StringBuilder();
                autheticateURL.Append(GmailSettings.AuthorizeUri).Append("?client_id=").Append(GmailSettings.clientID).Append("&scope=").
                    Append(GmailSettings.ScopeValue).Append("&response_type=code").Append("&redirect_uri=").Append(GmailSettings.CallbackUri);
                browseGoogle.Navigate(new Uri(autheticateURL.ToString(), UriKind.Absolute));
            }
            catch (Exception ex)
            {
    
                Logger.log(TAG, "browseGoogle_Loaded()", ex.Message);
    
            }
        }
    
        /// <summary>
        /// Called when the web browser initiates Navigation to various pages 
        /// </summary>
        /// <param name="sender">Browser</param>
        /// <param name="e">Navigating event arguments</param>
        private void browseGoogle_Navigating(object sender, NavigatingEventArgs e)
        {
            try
            {
                string hostName = e.Uri.Host;
                string URL = e.Uri.ToString();
    
                if (hostName.StartsWith("localhost"))
                {
                    NavigationService.Navigate(new Uri("/HomePage.xaml", UriKind.Relative));
                }
            }
            catch (Exception ex)
            {
    
                Logger.log(TAG, "browseGoogle_Navigating()", ex.Message);
    
            }
        }
    

    The XAML goes like this

      <phone:WebBrowser x:Name="browseGoogle" Loaded="browseGoogle_Loaded" IsScriptEnabled="true" Navigating="browseGoogle_Navigating" />
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some problems building an hierarchistic array structure - I have almost got
I thought I'd have a crack at building an Android app having not done
First off, I'm using Access 2000 and DAO. I have code that executes a
i have a bit of an odd problem. So building an iOS app that
I'm building a search page that will have many different search parameters that the
I am building a utility page for a web app that I am working
I'm having problems building my app on 1st generation iPod touch. I've changed the
I'm building a multithreaded app in .net. I have a thread that listens to
I'm building a simple app too that needs to access a calendar that's in
I'm building an app on google app engine and have it set with wildcard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.