title: SSO with Laravel Passport
body: <p>I'm thinking to develop a full-fledged Identity System in Laravel 5 with Passport.</p>
  
  <p><strong>Following is my requirement:</strong></p>
  
  <ol>
  <li>I should have main identity management app like identity.mysite.com where all of my users are stored.</li>
  <li>I have 2 other applications APP1, APP2.</li>
  <li>When user request restricted resource on APP1, (s)he should get authenticated by identity.mysite.com</li>
  <li>Once authenticated, let user access resources on APP1</li>
  <li>Meantime, if user decided to access restricted resources on APP2, (s)he should not be asked to put credentials again.</li>
  </ol>
  
  <p><strong>Things I've tried:</strong></p>
  
  <ol>
  <li><a href="https://simplesamlphp.org/" rel="noreferrer">simpleSAMLphp</a> - SAML is an option which does these things for me. But it is not as mature as <a href="https://www.onelogin.com/" rel="noreferrer">OneLogin</a> and I'm not thinking to go in SaaS model at this stage unless it is necessity.</li>
  <li><a href="https://laravel.com/docs/5.4/passport" rel="noreferrer">Laravel Passport</a> - <a href="https://oauth.net/2/" rel="noreferrer">oAuth 2.0</a> seems tempting. I can even use, <a href="https://laravel.com/docs/5.4/passport#password-grant-tokens" rel="noreferrer">Passport Grant Tokens</a> but I'm unsure on how reliable it is over SAML. Also, Laravel Passport is being widely used to authenticate API. Is it going to be useful while authenticating traditional session based apps? I haven't seen any example where the proper SSO is implemented with more than one application and laravel passport.</li>
  </ol>
  
  <blockquote>
    <p>I know OAuth 2.0 is not an authentication protocol. Rather it uses something called Authorization but we probably can make it work to support Authentication protocol as mentioned <a href="https://oauth.net/articles/authentication/" rel="noreferrer">here</a>. Is it something, that Laravel passport supports?</p>
  </blockquote>