steverhoades/oauth2-openid-connect-server
Laravel-friendly OAuth2 + OpenID Connect server built on League OAuth2. Provides OIDC discovery and JWT ID tokens, common grant types, and flexible storage/adapters so you can run your own authorization server for APIs and SSO.
Identity & Authentication Roadmap:
Build vs. Buy:
league/oauth2-server) with PHP League’s ecosystem.Use Cases:
authorization_code, client_credentials).Feature Expansion:
Adopt When:
Look Elsewhere If:
league/oauth2-client instead.openid-client), Java (e.g., Spring Security OIDC), or Python (e.g., authlib).*"This package lets us ship OIDC/OAuth2 authentication in weeks, not months, while future-proofing our platform for SSO, API access, and third-party integrations. By leveraging open-source standards (OpenID Connect), we avoid vendor lock-in and reduce costs compared to proprietary auth services. It’s a strategic move to:
- Accelerate time-to-market for features like partner logins or internal tooling.
- Improve security with token-based auth and compliance-ready protocols.
- Cut licensing fees—MIT license means no per-user or per-request costs.
- Unlock new revenue streams (e.g., offering our auth as a service to partners). The risk is minimal: it’s a drop-in Laravel plugin with a strong community (212 stars, active maintenance). We can pilot it with a single microservice before scaling."*
*"This is the league/oauth2-server package for OpenID Connect—think of it as the ‘Auth0 for Laravel,’ but self-hosted and extensible. Here’s why it’s a no-brainer:
- Proven Tech: Built on PHP League’s OAuth2 server (used by Laravel Passport, ForgeRock, etc.).
- Laravel-Native: Integrates seamlessly with Laravel’s ecosystem (e.g., works with Sanctum, Passport, or custom sessions).
- Protocol Coverage: Supports all OIDC flows (
authorization_code,implicit,client_credentials, PKCE) out of the box.- Extensible: Need custom claims or grant types? Hook into the middleware or write a custom grant.
- Performance: Lightweight (~5MB package) with no external dependencies beyond League’s OAuth2 server.
- Maintenance: Last release in September 2024; active GitHub issues suggest responsive maintainers.
Trade-offs:
- Not a ‘plug-and-play’ UI (you’ll need to build or integrate a login page/consent screen).
- Some edge cases (e.g., dynamic client registration) require extra config.
Proposal: Let’s use this for [Project X] to replace our ad-hoc JWT system. I’ll have a PoC ready in 2 days showing OIDC auth for our API and a Laravel admin panel. If it works, we can roll it out to [Y] and [Z]."*
How can I help you explore Laravel packages today?