Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good single sign-on solution for Laravel [closed]

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!

like image 782
lesssugar Avatar asked Jul 06 '15 08:07

lesssugar


People also ask

What is SSO in Laravel?

Laravel Single Sign-On (SSO) package acts as a SAML Service Provider (SP) which can be configured to establish the trust between the plugin and SAML capable Identity Providers(IdP) to securely authenticate the user to the Laravel site.

How does PHP SSO work?

When the client visits the broker, it creates a random token, which is stored in a cookie. The broker will then send the client to the server, passing along the broker's id and token. The server creates a hash using the broker id, broker secret and the token. This hash is used to create a link to the user's session.

What is SSO username?

Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials -- for example, a name and password -- to access multiple applications.


2 Answers

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

like image 67
smartin Avatar answered Oct 20 '22 07:10

smartin


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.

like image 1
Devasya Dave Avatar answered Oct 20 '22 09:10

Devasya Dave