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!
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.
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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With