0

I am creating one android app, in which I want user to login with it's Gmail id and password. And it should be authenticated from the google server. I am using the OAuth 2.0. I have done following steps as mentioned in https://developers.google.com/accounts/docs/OAuth2InstalledApp

  1. Register my app on console
  2. Generate Clint id, client secrete and API key.
  3. I have created request url as :

    String authorizationUrl = new GoogleAuthorizationRequestUrl(client_id, redirect_url, scope).build();

redirect_url : "urn:ietf:wg:oauth:2.0:oob", scope : "https://www.googleapis.com/auth/siteverification"
  1. Post this url for response.

In response, it opens up a dialogue box to enter user name again. I want to generate token in background. I don't want to show dialog box for authenticating user on requested url.

Please suggest me what should do here.

Thanks

Kapil
  • 108
  • 1
  • 12
  • bad idea ... it is not how oauth works ... you have to redirect user to browser they trust, not ask user for username and password ... – Selvin Jun 04 '13 at 13:29
  • @Selvin, thanks for the response, I have a web application which requires gmail credentials to login. I am creating android app for the same. In my app I want to implement login page which will ask for credentials and if these are valid user will be redirected to second page of app. – Kapil Jun 04 '13 at 13:37
  • http://stackoverflow.com/questions/6966965/best-way-to-use-google-apis-using-oauth-2-0-on-android – Selvin Jun 04 '13 at 13:45

0 Answers0