jeffersongoncalves/filament-saml2
Add SAML2 single sign-on to Filament panels with this plugin. Connect your identity provider, configure SP and IdP settings, and let users authenticate securely through SAML2 in Laravel Filament admin apps.
filament-saml2 3.0.0 is the Filament v5 line of the package. It is a feature-parity re-release of 2.0.0 (Filament v4) and 1.0.0 (Filament v3), so the main thing to verify first is your Filament major version.
composer require jeffersongoncalves/filament-saml2:"^3.0"
If you are on Filament v3 or v4, stay on ^1.0 or ^2.0 respectively — do not try to force 3.0 onto an older panel stack.
First steps:
saml2_identities table.jeffersongoncalves/laravel-saml2.The first useful use case is a single panel with a single corporate IdP: user clicks the IdP button, authenticates at the IdP, is returned through the ACS endpoint, and is resolved/created locally by NameID or e-mail.
Where to look first:
saml2_identities migration to understand the identity linkage model.jeffersongoncalves/laravel-saml2 config/docs for low-level SAML behaviour, since this package is the Filament integration layer.One plugin registration per panel. Register the plugin in each PanelProvider that should support SSO, and pass per-panel options there. This is the intended place for panel-specific behaviour such as which IdP tenants to show, button labels, and user-resolution settings. Keep panel options explicit rather than relying on a single global default.
Multiple IdPs via tenants. Model each identity provider as a tenant and let the package render one login button per tenant. Use distinct labels/icons so users know which button to pick. If local password login is not allowed, remove or hide Filament's default login form and rely on the IdP buttons.
RelayState-based panel resolution. A shared ACS endpoint uses RelayState to send the user back to the panel that initiated login. This is what makes multi-panel setups work without a separate callback per panel. Treat RelayState as part of your integration contract: do not rewrite or strip it in middleware, proxies, or custom login pages.
User resolution by NameID/e-mail. Prefer a stable NameID mapping where the IdP provides one; fall back to e-mail when that is the identifier you trust. Enable auto-create deliberately. For existing applications, resolve to existing users by e-mail and link the identity rather than creating a second account.
Polymorphic identities. The saml2_identities table is polymorphic, so the same package can link identities to different user models. This is useful if you have separate admin/customer models or guards per panel. Make sure the panel's auth guard and user provider match the model you expect the resolver to return.
Translations. The package ships en, pt_BR, and es. Publish/override the language files if you need different button text or error messages, and keep custom copy in your app's lang directory rather than editing vendor files.
Integration tips.
composer why-not if installation fails.php artisan config:clear (and optimize again in production). Stale cached SAML config is a common cause of "nothing changed".config/session.php alongside SAML config.storage/logs/laravel.log, the underlying laravel-saml2 logging, and the SAML response/toolkit output. Temporarily increase SAML debug logging in non-production environments only.How can I help you explore Laravel packages today?