Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SupunSam's avatar

How to Integrate SSO with Default Laravel Authentication System

Hi All,

I have created an application in Laravel and with that, I have created a Login/Registration system as well. It is working fine. I have added and User Roles to this Login system as well.

However Now I have come across a requirement to migrate my authentication to SSO(Single Sign-On) system.

Is this possible without turning my application completely upside down?

0 likes
4 replies
Jaytee's avatar

Yep, it's possible.

Here's a package for SAML: https://github.com/aacotroneo/laravel-saml2

We also implemented our own with the default authentication. It's a long story, but to simplify it:

We used to deal with usercodes along with LDAP/Azure etc. We'd pass the usercode via a variable in the server, and then pick it up. Then we'd check if a local account exists in the database, if it didn't, we'd create it and then sign them in. Bare in mind, all of our applications at work were on like a local intranet.

It's not a complex issue to integrate into Laravel.

1 like
SupunSam's avatar

Hi @jaytee. is there any tutorial on how to do this. I already have an SSO service. Which was provided by a third party? I just need to integrate this into my application.

pratik.kumar7500's avatar

Hi there,

You can use this package to enable Single Sign-on into your Laravel application - miniorange/laravel . You can install it easily using composer by running this command “composer require miniorange/saml-laravel-free” It provides you a GUI for the setup and the authentication flow works on its own. Thus it will help you save a lot of time and enable SSO easily.

Please or to participate in this conversation.