Does anybody know if this is possible? On Monday, September 15, 2014 11:34:14 AM UTC-7, Nick Badal wrote: > > Right, that method works for authenticating directly to google APIs; but > like I said, it doesn't seem to work with GAE's UserService > > On Saturday, September 13, 2014 12:20:46 PM UTC-7, pankaj anand wrote: >> >> Have a look at here: >> >> >> http://android-developers.blogspot.in/2012/09/google-play-services-and-oauth-identity.html >> >> On Saturday, 13 September 2014 01:00:03 UTC+5:30, Nick Badal wrote: >>> >>> I'm building a backend for an Android app using GAE (Java), and I'd like >>> to authenticate users on the client and server with their Google accounts. >>> >>> Before OAuth2, you were able to use a Cookie retrieved from the >>> _ah/login endpoint to authenticate users into your web app, but that method >>> is deprecated and I'd like to be able to use the updated OAuth2 method. >>> >>> In my Android app I've been able to generate a JSON Web Token using the >>> following line: >>> >>>> String jwt = GoogleAuthUtil.getToken(FamiliarActivity.this, >>>> Plus.AccountApi.getAccountName(mGoogleApiClient), >>>> "audience:server:client_id:1234567.apps.googleusercontent.com"); >>> >>> >>> or an OAuth token: >>> >>>> String oauth2 = GoogleAuthUtil.getToken(FamiliarActivity.this, >>>> Plus.AccountApi.getAccountName(mGoogleApiClient), >>>> "oauth2:server:client_id:1234567.apps.googleusercontent.com:api_scope: >>>> https://www.googleapis.com/auth/plus.login"); >>> >>> >>> But, I haven't been able to figure out a way to use a token like this to >>> trigger authentication in GAE like the Cookie used to. The documentation >>> seems to indicate passing it as a header: "Authorization: Bearer <TOKEN>" >>> but that doesn't seem to work. >>> >>> I'd like to be able to prompt my users with the permissions they're >>> allowing, send that info (I'd assume via the OAuth2 token) to my server, >>> and be able to obtain that user via the UserService. >>> >>> What is the correct way to retrieve and pass a token to my GAE endpoint >>> so that it authenticates the user? >>> >>> Thanks! :) >>> >>
-- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
