title: Simple demo of OAuth in PHP-MySQL
body: <p>I'd like to make an OAuth implementation for my site. Not one where I allow users to connect to FB, Twitter, but rather one which connects users or their apps to <em>my site</em>.</p>
  
  <p>There are many good reads of <a href="https://stackoverflow.com/questions/1626575/best-practices-around-generating-oauth-tokens">how to do this</a>, but less code demonstrating an actual example. <a href="https://github.com/php-loep/oauth2-server" rel="nofollow noreferrer">The code bases I've found</a> while impressive are overwhelming.</p>
  
  <p>Might someone point me to a <strong>simple</strong> PHP script which implements OAuth? I realize there is a database component but assume that part can be described in words, though I'm using MySQL if there might be companion code for that.</p>