pbhowmick
pbhowmick

Reputation: 1113

Authenticated communication b/w Android app And GAE server using OAuth2

New to OAuth2. I am writing an Android app that communicates with an App engine server application.

  1. The app needs to authenticate itself with the server on behalf of the user, using Google account info of the user. The server needs to retrieve the user's basic info and create an account . That's the easy part and I know how to do this.
  2. Furthermore, the Android app will also have the user authenticate himself/herself using Oauth2 and retrieve basic user info using Google account info of the user. I can do this as well.
  3. This is where I need help Assuming the previous steps have been completed successfully, how can I use the Android app (where the user has logged in) to communicate with the server securely using the user's credentials.

Any ideas or am I missing something obvious?

Upvotes: 1

Views: 347

Answers (2)

Fred Sauer
Fred Sauer

Reputation: 1022

The Android to App Engine OAuth2 communication is documented in this answer: google app engine oauth2 provider

Upvotes: 1

datayja
datayja

Reputation: 712

Using OAuth, 1.0 or 2.0, doesn’t matter in this, leads to the app obtaining an access token - then based on the API of your server, you pass this access token with requests instead of login and password. I guess the way to attach the access token string to URL requests may be slightly different between different APIs, see the documentation for yourself. Or if you are making the server app at the same time, then you need to figure out your way to do so (like sending a HTTP header Authorization: OAuth access_token=abcdefgh….

Upvotes: 0

Related Questions