mzm/sso

Laravel package for SSO integration between apps clients

Maintainers

Details

github.com/mzm-dev/sso

Source

Issues

Installs: 37

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:Blade

1.1.0 2025-04-24 07:01 UTC

This package is auto-updated.

Last update: 2025-05-24 07:09:36 UTC


README

Single Sign On client package for Laravel project

Requirements

  • Laravel 8+
  • PHP 9.x
  • Composer version 2

How it works?

User visits Agencies System and unique token is generated. When new token is generated we need to attach User session to his session in Agencies System so he will be redirected to Server and back to Agencies Syste at this moment new session in Server will be created and associated with User session in Agencies System's page. When User visits other System cross Agencies same steps will be done except that when User will be redirected to Server he already use his old session and same session id which associated with Token#1.

Installation

Server

Install this package using composer.

$ composer require mzm/sso

Copy config file to Laravel project config/ folder.

$ php artisan vendor:publish --tag=sso-config

Copy views file to Laravel project resources/views/ folder.

$ php artisan vendor:publish --tag=sso-views

options in your .env file:

SSO_ENABLE=true
SSO_BASE_HOME=home
SSO_ORIGIN=
SSO_TOKEN=
SSO_BASE_URL=
SSO_GUARD=web
SSO_CACHE_KEY=
SSO_USER_MODEL=\App\Models\User
SSO_AUTH_FIELDS=email

Button

<x-sso::button />

SSO Logged

Permission Folder

mkdir -p storage/logs/sso

permission & owner

chmod -R 775 storage/logs/sso
chown -R www-data:www-data storage/logs/sso