johnriveragonzalez/saml2-okta
Composer 安装命令:
composer require johnriveragonzalez/saml2-okta
包简介
Filament panel plugin for SAML2 SSO authentication with Okta and other identity providers
关键字:
README 文档
README
Complete SAML2 SSO authentication for Filament panels — optimized for Okta, compatible with any SAML2 identity provider.
Panel plugin that adds SAML2 single sign-on to your Filament admin panel. Configure IdP credentials, certificates, user mapping, and a login button — all from the Filament UI. Database-driven configuration (no SAML secrets in .env).
Built following the official Filament plugin guidelines: PackageServiceProvider, Filament\Contracts\Plugin, and Schema-based panel pages.
Features
| Feature | Description |
|---|---|
| SAML2 authentication | Full SP-initiated flow with Okta, Azure AD, Google Workspace, Auth0, and any standard SAML2 IdP |
| Filament admin UI | Settings, certificates, field mapper, and debug pages inside your panel |
| Auto certificates | Generate and regenerate SP X.509 certificates from the panel |
| User provisioning | Auto-create/update users, default roles, external-user flag |
| Field mapper | Visual mapping from SAML attributes to your User model |
| Login button | Injected via render hook with provider icons (Okta, Microsoft, Google, Auth0) or Heroicons |
| Debug mode | Detailed SAML logs for troubleshooting |
| Translations | English and Spanish included |
| Dark mode | Compatible with Filament light/dark themes |
Requirements
| Branch | Filament | Laravel | PHP |
|---|---|---|---|
master / 5.x |
5.x | 11+ / 12+ | 8.2+ |
4.x |
4.x | 11+ | 8.2+ |
Installation
1. Install via Composer
# Filament 5.x composer require johnriveragonzalez/saml2-okta:^2.0 # Filament 4.x composer require johnriveragonzalez/saml2-okta:^2.0 --prefer-source # Require branch 4.x in your composer.json if needed
2. Publish migrations and migrate
php artisan vendor:publish --tag="saml2-okta-migrations"
php artisan migrate
3. Register the plugin
In app/Providers/Filament/AdminPanelProvider.php:
use JohnRiveraGonzalez\Saml2Okta\Saml2OktaPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ Saml2OktaPlugin::make(), ]); }
4. Run the installer
php artisan saml2-okta:install
This command extends your User model, updates UserResource, and completes the initial setup.
5. Optional publishes
php artisan vendor:publish --tag="saml2-okta-translations" php artisan vendor:publish --tag="saml2-okta-config"
Configuration
Open SAML2 → Configuración SAML2 in your Filament panel.
Main settings
Identity provider (Okta / IdP)
| Field | Description |
|---|---|
| Client ID | Application client ID from your IdP |
| Client Secret | Application secret (optional update on save) |
| IDP Entity ID | Entity ID from Okta or your IdP |
| IDP SSO URL | Single sign-on URL |
| IDP X.509 Certificate | IdP public certificate |
Service provider (your app)
| Field | Description |
|---|---|
| SP Entity ID | Auto-generated metadata URL |
| Callback URL | https://your-domain.com/saml2/callback |
| SP Certificate / Private Key | Generate from the panel or paste your own |
User settings
- Auto-create users on first login
- Auto-update existing users
- Default role for new SAML users
- Mark users as external
Login button
- Toggle SAML2 login on/off
- Custom button label and icon (Okta, Microsoft, Google, Auth0, or Heroicons)
Debug & field mapper
- Enable debug logging to inspect SAML attributes
- Map IdP fields to
Usercolumns with live sample data
Production checklist
- Use HTTPS — SAML2 requires TLS in production.
- Set
APP_URLto your real domain. - Register callback URL in your IdP:
https://your-domain.com/saml2/callback - Upload SP metadata or certificate to your IdP.
- Disable debug mode after testing.
- Run
php artisan optimizeafter deployment.
Artisan commands
php artisan saml2-okta:install
php artisan saml2-okta:extend-user-model
php artisan saml2-okta:extend-user-resource
php artisan saml2-okta:unregister-middleware # legacy upgrades only
Package structure
src/
├── Commands/
├── Controllers/
├── Models/
├── Pages/
├── Services/
├── Saml2OktaPlugin.php
└── Saml2OktaServiceProvider.php
database/migrations/
resources/views/
routes/web.php
lang/en|es/
Compatible identity providers
With bundled icons: Okta, Microsoft / Azure AD, Google Workspace, Auth0
Also compatible: OneLogin, Ping Identity, Shibboleth, ADFS, and any SAML2-compliant IdP.
Contributing
Issues and pull requests are welcome at github.com/Johnrivera7/filamentSaml2Okta.
License
MIT © John Rivera Gonzalez
Español
Plugin completo de autenticación SAML2 para paneles Filament. Instalación, configuración de Okta/IdP, certificados, mapeo de campos y botón de login desde la interfaz de administración. Compatible con Filament 4.x y 5.x. Ver secciones anteriores para instalación detallada.
johnriveragonzalez/saml2-okta 适用场景与选型建议
johnriveragonzalez/saml2-okta 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 29 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Authentication」 「SSO」 「panel」 「laravel」 「single-sign-on」 「SAML2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 johnriveragonzalez/saml2-okta 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 johnriveragonzalez/saml2-okta 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 johnriveragonzalez/saml2-okta 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
Yii2 panel widget
Email Toolkit Plugin for CakePHP
A Laravel Admin Package for The Control Group to make your life easier and steer your project in the right direction
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-05





