title: What is social networks authorization workflow?
body: <p>In our application we provide user authentication possibility which gives him additional rights and functions. Now we need to add an ability to login into our application using social networks (Facebook, Twitter, Google+, LinkedIn). We don't need any functions of these networks.
  I've read these articles about social networks authentication on Android:</p>
  
  <ul>
  <li><a href="https://developer.linkedin.com/docs/android-sdk-auth" rel="nofollow">LinkedId</a></li>
  <li><a href="http://examples.javacodegeeks.com/core-java/android-facebook-login-example/" rel="nofollow">Facebook</a></li>
  <li><a href="https://developers.google.com/+/mobile/android/getting-started" rel="nofollow">Google+</a></li>
  <li><a href="http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/" rel="nofollow">Twitter</a></li>
  </ul>
  
  <p>All of these networks provide their own Android libraries which handle authentication process. I don't know if I need to use them (they have different APIs and seems to be quite "heavy"). I also found 3d party <a href="https://github.com/antonkrasov/AndroidSocialNetworks#features" rel="nofollow">library</a> which handles all of the needed networks.</p>
  
  <p>Now what I don't know:</p>
  
  <ol>
  <li>After user logs in into any of these networks using appropriate library mentioned above what do I have to send to OUR server to login him into our application? Is it OAuth token (but it seems to be valid only for mobile application which aquires it), SN user id, email or anything else (let's call it <strong><em>access token</em></strong>)?</li>
  <li>After access token is sent to the server what server has to do with it? For example aftet successful login through any of SN user tries to use one of the features our application login provides. Each of these features needs server request. So when one of these requests comes to our server does it need to check if access token is still valid or it must just create our user instance once token comes for the first time and later it doesn't need it anymore?</li>
  <li>Do I need to store access token locally on device or after it is sent to the server I can forget about it?</li>
  <li>How to provide logout function?</li>
  </ol>
  
  <p>Ok, I understand that this question may be not correctly formulated so please, feel free to ask for more info if you need it.</p>