Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure what you are trying to do is possible through the App Engine OAuthService used in the article you are referring to. Also it is stated that AppEngine OAuthService only supports OAuth 1 but Android only supports OAuth 2 :) so you are screwed.</p> <p>If you want to do cross Android - App Engine authentication, what I would do is:</p> <ol> <li>In Android: get an access token for the UserInfo API (scope = <code>https://www.googleapis.com/auth/userinfo.email</code> and <code>https://www.googleapis.com/auth/userinfo.profile</code>) from the AccountManager.</li> <li>Pass the access token to App Engine in a URL param of the request you are making from Android to AppEngine (make sure you use HTTPS to avoid interception!).</li> <li>On the App Engine side: use the access token to read the user's identity using the <a href="https://developers.google.com/accounts/docs/OAuth2Login" rel="noreferrer">UserInfo API</a>. This is basically using OpenID Connect!</li> <li>Then you can use the information you got from the UserInfo API to authenticate the user. The email and the user ID you'll get from the UserInfo API is equivalent to the email and user ID you would get from the AppEngine's UserService => you can trust it!</li> </ol> <hr> <p>PS: I described getting OAuth 2 tokens using the Android AccountManager in <a href="https://developers.google.com/google-apps/tasks/oauth-and-tasks-on-android" rel="noreferrer">this article</a>. It was written pre-Ice Cream Sandwich but I'm hopping it is still valid. Basically the <code>authTokenType</code> needs to be <code>oauth2:{scopes}</code>, so for instance <code>oauth2:https://www.googleapis.com/auth/tasks</code> for the Tasks API. There might be some better ways to do this now.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload