title: Custom oAuth server implementation and its advantages
body: <p>We have multiple web projects(sites), each has its own Authorization logic. Today I have been asked by my CIO to implement oAuth and use that for validating user across all sites.</p>
  
  <p>Earlier I have used oAuth for Google, Facebook, Twitter and Microsoft. I have  multiple questions here</p>
  
  <ol>
  <li>What are the advantages of implementing oAuth provider</li>
  <li>What is the best approach in a generic oAuth principles</li>
  <li>Can I use this oAuth server for Single Sign On</li>
  </ol>
  
  <p>When I have user oAuth from Google or other, the idea was to eliminate user effort to register on my site rather use the same credentials that he/she hae for Google. <strong>Is that the only advantage I would get if I create my custom oAuth?</strong></p>
  
  <p>Implementing oAuth:</p>
  
  <ul>
  <li>Create a Application Entity with ApplicationName, ClientID, ClientSecrete</li>
  <li>Create User Entity with UserId, UserName, Password, ApplicationID</li>
  <li>Share the unique ClientID and Secrete with each site and when the user tries to log in from that site, pass the clientID, clientSecrete, UserName, Password and validate and return true or false</li>
  <li>Follow the similar flow for user to register to the system.</li>
  </ul>
  
  <p>On a high level will my above flow satisfies oAuth concept? is there a in-depth implementation details of oAuth that I can refer to get better understanding?</p>