title: Integrating Auth0 authentication with existing user database
body: <p>I've a requirement to integrate Auth0 in our project (Reactjs/Hapijs/MySQL). I checked the documentation and they have many examples and that is great, however, I can't find any related to how exactly do I use my existing user database.</p>
  
  <p>In my application I have users and those users can have one or more projects. With the authorization that we currently use, a user logs in, I check what projects does he own and send it to the React application.</p>
  
  <p>I am missing a document that explains me how to use Auth0 and still be able to check in my database what projects user owns.</p>
  
  <p>My idea on how that should work (I might be wrong):</p>
  
  <ol>
  <li>User sends username and password to our server</li>
  <li>Our server makes request to Auth0 (with provided credentials)</li>
  <li>Auth0 replies back to our server with some <strong>token</strong></li>
  <li>We look in users table in our database and try to verify the existence of that user</li>
  <li>If it is a match then we simply look (as we already do) for user projects.</li>
  </ol>
  
  <p>Is this how it is supposed to work?</p>