cleaniquecoders/laravel-config-sso
Laravel Config SSO centralizes single sign-on configuration for Laravel apps, making it easier to manage SSO settings, providers, and environment-specific options from one place—ideal for teams standardizing authentication across multiple applications.
This is cleaniquecoders/laravel-config-sso — a config-driven SSO package with a Livewire/Flux admin screen at /admin/settings/sso. The 1.0.2 release fixed icons and workbench/tooling. The 1.1.0 release is a minor with no breaking API changes called out, but it includes an important sign-in security behavior change: SSO sign-in can now claim an existing unverified local account matched by email.
Minimal path from zero to a working login:
composer require cleaniquecoders/laravel-config-sso and publish the package config (php artisan vendor:publish — pick the SSO provider tag). Run migrations if the package persists settings/identities.docs/ in this order: architecture (how the flow and settings store fit together), configuration (every key and its env var), api/usage (routes, guards, helpers). Then read the 1.1.0 security note and event docs. The README is a thin overview with screenshots — the docs tree is the real reference.Flux component [icon.*] does not exist the moment you open the settings page.web guard.composer serve boots the demo app. Use composer build for compiled Tailwind + Flux assets rather than the CDN.Treat the published config as the environment contract. Put IdP URLs, entity/client IDs, and certificates behind env vars so local, staging, and production differ only by .env. Keep one committed config file with safe defaults and no secrets.
Decide early whether the admin UI or the config file is the source of truth. If the Livewire screen writes to the database, document the precedence (typically: DB override → config default) and make sure a fresh deploy without DB rows still boots from config. Ambiguity here is the most common source of “works on my machine” SSO bugs.
Protect routes by group, not per-route. Apply the package middleware to a route group and keep a separate local-auth guard for break-glass admin access. Never let an SSO outage lock every admin out — keep at least one password/CLI-driven path in.
Map claims deliberately. Resolve the IdP subject to a local user by a stable identifier (subject/object ID) rather than email, and treat email as a linking heuristic only. Handle the first-login case (create vs. reject) explicitly, and log the claim payload on mismatch — name/email casing and multi-valued attributes bite regularly.
Handle the 1.1.0 unverified-account claim deliberately. When SSO sign-in matches an existing local account by email and that account is not yet verified, the package now claims it: it rotates the password and remember token, marks the email verified, and then signs the user in. This prevents pre-account takeover, but it changes onboarding flows. If your app creates unverified local users as invitations or placeholders, audit that path: the first matching SSO login will take the account over.
Listen to UnverifiedAccountClaimed. Register a listener for CleaniqueCoders\ConfigSso\Events\UnverifiedAccountClaimed to revoke app-specific credentials that should not survive an account claim: 2FA enrollment, API tokens, passkeys, remembered devices, or other downstream sessions. Keep the listener idempotent and decide whether it should run synchronously or on a queue.
Mirror the package's own test strategy in your app. Feature tests alone are insufficient for Flux views: in the test harness Flux renders icons as no-ops, so a bad icon name passes CI and 500s in production. Add a small static test (like the upstream FluxIconTest) that greps your admin views for flux:icon.* / <x-icon> names and asserts each is a real Heroicon. Also add a test for the unverified-account claim path: assert email_verified_at is set, password and remember token are rotated, and UnverifiedAccountClaimed is dispatched.
Develop against the workbench. Run composer serve for a disposable app, and use composer build for the compiled Tailwind + Flux stylesheet rather than the CDN — the CDN works but hides Tailwind purge/config problems that appear in a real build. Same applies to your app's own admin views.
Extension points to reach for before forking: the config file, publishable views for the settings screen, custom user resolution/claim mapping, event listeners for UnverifiedAccountClaimed, and your own guard + middleware aliases.
UnverifiedAccountClaimed fires only on this claim path. Do not put ordinary SSO-login 2FA or token-revocation logic there unless you also handle normal sign-ins.forceFill is used for SSO-created users. The release fixes email_verified_at being blocked by mass-assignment. Do not assume $fillable protects verification state elsewhere; if you have custom user creation, set verification explicitly.ellipsis → ellipsis-horizontal, trash-2 → trash, eye-off → eye-slash. Any custom view you publish inherits this constraint — audit your own icon usage, not just the package's.Flux component [icon.x] does not exist is thrown at render time, in the browser, not at boot. Nothing in php artisan about or route:list will warn you.php artisan config:cache in deploys will freeze SSO settings; if the admin UI persists to DB, remember that a config-cached deploy ignores .env edits until re-cached.composer serve. Pin >=1.0.2 if you rely on the demo.How can I help you explore Laravel packages today?