25

I plan to introduce a single sign-on (SSO) to my Laravel 5 applications. Basically, I have two websites on different domains. The idea is simple: if I'm already authenticated on one of them, I don't need to sign in on the other.

I've been looking for a solution for a while now, but I would like to ask you: Do you know or can recommend a package or library to provide SSO to Laravel application?

Native PHP solutions are also welcome. Thanks!

Kailas
  • 3,173
  • 5
  • 42
  • 52
lesssugar
  • 15,486
  • 18
  • 65
  • 115
  • have you completed this implementation? – Ashok Dongare Feb 27 '16 at 13:09
  • Yes I did. It's all working fine, however we don't use it on production yet. A new platform is going to be developed and after it is SSO will chain the whole domain family. – lesssugar Feb 27 '16 at 13:52
  • @lessugar Thanks for reply. I was trying to integrate laravel-saml2 in my web application as mentioned in this link: https://github.com/aacotroneo/laravel-saml2. I've installed and configured as per the steps given in documentation. However if I add a handle method described under usage section of documentation, I'm getting Class 'App\Http\Middleware\SAML2' not found error. Any thought on this? I think I should post new question. It's difficult to explain everything here. – Ashok Dongare Feb 29 '16 at 07:03
  • @AshokDongare Yep, you definitely should post a new question and provide more info on the error. – lesssugar Feb 29 '16 at 13:04
  • @lesssugar can you please explain a little bit how did you implement this Thanks in advance , – Muhammad Usama Mashkoor Sep 22 '17 at 19:17

2 Answers2

12

You can use the SAML standard in order to solve your SSO needs.

Review this github repository that help you implement a SAML service provider: https://github.com/aacotroneo/laravel-saml2

If you need to implement a SAML Identity provider you can use simpleSAMLphp and use Lavarel database as authentication source. https://simplesamlphp.org/docs/stable/simplesamlphp-idp

smartin
  • 2,957
  • 2
  • 23
  • 33
1

You can try out the miniorange/saml-laravel-free package. It makes things quite simple as it also provides a GUI and also does the whole authentication thing own its own.

Kalpesh
  • 89
  • 1
  • 11