title: Performing Google Federated Login/oAuth2 after initial Authentication
body: <p>I am trying to support "Hybrid" Federated Login and oAuth2 (using logic from <a href="http://code.google.com/apis/accounts/docs/OAuth2Login.html">this document</a>) for a webservice which will:</p>
  
  <ol>
  <li>support <strong>Sign in using your Google account</strong> on my site. That is, from the documentation: <em>You can also choose to use Google's authentication system as a way to outsource user authentication for your application. This can remove the need to create, maintain, and secure a username and password store</em>.</li>
  <li>Access the user's Google Analytics.</li>
  </ol>
  
  <p>Here are the steps I have done.</p>
  
  <ol>
  <li>I form my request to <strong>https://accounts.google.com/o/oauth2/auth</strong> with the scopes (Google Analytics)  I want access to.</li>
  <li>I Get redirected to google where it has my icon and which scopes I am requesting access to.  I grant access.</li>
  <li>I get redirected back to the callback page.</li>
  <li>I get the tokens (access and refresh), as well as a huge id_token string (which I don't know) and store all of this information in my database.</li>
  <li>I then make a call to <strong>https://www.googleapis.com/oauth2/v1/userinfo?access_token=xxxyyyzzz</strong> to get the user's email and name and store this information in my database too.  I also notice it returns a <strong>id</strong> field which to my knowledge never changes and I presume is some sort of unique identifier.  I store this too.</li>
  </ol>
  
  <p>Question: If I go to <strong>Authorized Access to your Google Account</strong> section in my Google account, it shows that my site has access to "Google Analytics.  BUT, it does not say <strong>Sign in using your Google account</strong>.  This is what I am trying to accomplish.  I would have thought using the logic would enable <strong>Sign in using your Google account</strong>.  What am I doing wrong?  And what would be the applicable call to google so that users can sign in to my site?  </p>