Skip to content Skip to sidebar Skip to footer

Can I Use Google Plus Sign In To Authenticate My Oauth Methods In App Engine?

I successfully implemented Google Account sign in using the tutorial here for Android: https://developers.google.com/appengine/docs/java/endpoints/getstarted/clients/android/add_au

Solution 1:

Once signed in using Google+, you're almost good to go to talk to your Backend API. Something like this was what I did:

   @Override
   public void onConnected(Bundle bundle) {

    // Update the user interface to reflect that the user is signed in.
    mSignInProgress = STATE_DEFAULT;

    if (BuildConfig.DEBUG) {
        Log.i(LOG_TAG, "Signed in");
    }
    final String accountName = Plus.AccountApi.getAccountName(mGoogleApiClient);
    credential.setSelectedAccountName(accountName); // private GoogleAccountCredential credential;


    // call your GAE stuff


    }

Post a Comment for "Can I Use Google Plus Sign In To Authenticate My Oauth Methods In App Engine?"