Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As part of their <a href="https://developers.google.com/accounts/docs/OAuth2Login" rel="nofollow">OAuth2 for login</a> process, Google provide a <code>TokenInfo</code> endpoint that is used to validate and provide information about the <code>access_token</code> that is obtained earlier in the process.</p> <p>The token information includes <code>userid</code>:</p> <blockquote> <p>"The value of this field is an immutable identifier for the logged-in user, and may be used when creating and managing user sessions in your application. This identifier is the same regardless of the client_id. This provides the ability to correlate profile information across multiple applications in the same organization."</p> </blockquote> <p>which sounds like just the ticket (or perhaps token)!</p> <p><code>userid</code> is only present if the <code>https://www.googleapis.com/auth/userinfo.profile</code> scope was included in the access token request, so don't forget that.</p> <p>Similarly, in the <a href="https://developers.facebook.com/docs/authentication/" rel="nofollow">Facebook API</a> you have access to the graph API once you've obtained an access token where you can get user data, including ID.</p> <p>Twitter include the <code>user_id</code> in the access token response as part of their <a href="https://dev.twitter.com/docs/auth/implementing-sign-twitter" rel="nofollow">authentication API</a></p> <hr> <p>If you're using OAuth in a .NET project this might be useful... I discovered today that <a href="http://www.microsoft.com/web/webmatrix/" rel="nofollow">WebMatrix 2 Beta</a> includes OAuth2 clients for Facebook, Twitter, Windows Live, Google and Yahoo, and can be used from an MVC project. I'm told that you just need the <code>WebMatrix.Security.dll</code> and you're good to go. It's installed into <code>C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies</code>. Although it's in beta and hidden away, it's a good way to get started and might make the the learning curve with the <a href="http://www.dotnetopenauth.net/" rel="nofollow">DotNetOpenAuth</a> library a bit less steep.</p>
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    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