bambamboole/laravel-oidc-client
| Install | |
|---|---|
composer require bambamboole/laravel-oidc-client |
|
| Latest Version: | v0.32.0 |
| PHP: | ^8.4 |
| Laravel: | 13 |
| Older releases: | 11 · 12 |
| License: | MIT |
| Last Updated: | Sep 12, 2026 |
| Links: | GitHub · Packagist |
laravel-oidc-client
An OpenID Connect (OIDC) relying party for Laravel — log your users in through
any OIDC provider using the Authorization Code + PKCE flow, with strict id_token
validation against the provider's JWKS.
This is the client-side companion to
bambamboole/laravel-oidc (the OIDC
provider). The two are deliberately separate packages: an app that only needs to
consume an identity provider should not pull in a full OAuth2 authorization server,
TOTP, QR codes, and WebAuthn. Point this package at your own laravel-oidc provider
for self-SSO, or at any third-party IdP (Keycloak, Auth0, Okta, …).
What you get
- Authorization Code + PKCE login against any spec-compliant provider, with one-time
state/nonceand single-use callback context. - Discovery-driven setup — endpoints and JWKS come from
/.well-known/openid-configuration, cached, with automatic JWKS refresh on unknownkidso provider key rotation just works. - Strict
id_tokenvalidation — RS256 signature,iss,aud,azp,nonce, andexp/nbf/iatwith configurable leeway. - A user-resolution seam —
OidcClient::resolveUsersUsing(...)maps token claims to your user model; the default resolves the guard provider bysub. - RP-initiated logout to the provider's end-session endpoint with
id_token_hint. - Back-channel logout (opt-in) — accepts provider-pushed logout tokens and tears down the matching local session immediately (server-side session drivers) or on the next request (enforcement middleware).
Requirements
- PHP
^8.4 - Laravel 13
Installation
composer require bambamboole/laravel-oidc-client
# Optional: publish the config
php artisan vendor:publish --tag=oidc-client-config
The service provider is auto-discovered. The relying party is off until enabled:
OIDC_RP_ENABLED=true
OIDC_RP_ISSUER=https://id.example.com
OIDC_RP_CLIENT_ID=...
OIDC_RP_CLIENT_SECRET=... # optional — omit for a public client
See the docs for the full walkthrough, every config key, and the back-channel logout setup.
Documentation
The full documentation lives at
bambamboole.github.io/laravel-oidc —
the client pages are under
/client/. It is built
from the docs/ directory of the
laravel-oidc monorepo.
Changelog
All packages in the suite are versioned in lockstep; see the monorepo changelog.
Development
The suite runs from the root of the monorepo, which holds the single Composer install for all packages:
composer install
composer check # pint --test, phpstan, rector --dry-run, pest
Tests run in isolation through Orchestra Testbench — no external OIDC provider is required.
License
MIT.
Related Packages
OpenID Connect suite for Laravel — identity provider (server), relying party (cl...
OpenID Connect Server for Laravel Passport — adds OIDC Discovery, JWKS, UserInfo...
OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Larave...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.32.0 | ^8.4 | ^13.0 | MIT | |
| v0.31.0 | ^8.4 | ^13.0 | MIT | |
| v0.30.0 | ^8.4 | ^13.0 | MIT | |
| v0.29.0 | ^8.4 | ^13.0 | MIT | |
| v0.28.0 | ^8.4 | ^13.0 | MIT | |
| v0.27.1 | ^8.4 | ^13.0 | MIT | |
| v0.27.0 | ^8.4 | ^13.0 | MIT | |
| v0.26.0 | ^8.4 | ^13.0 | MIT | |
| v0.25.0 | ^8.4 | ^13.0 | MIT | |
| v0.24.0 | ^8.4 | ^13.0 | MIT | |
| v0.23.0 | ^8.4 | ^13.0 | MIT | |
| v0.22.0 | ^8.4 | ^12.0 || | MIT | |
| v0.21.2 | ^8.4 | ^12.0 || | MIT | |
| v0.21.1 | ^8.4 | ^12.0 || | MIT | |
| v0.21.0 | ^8.4 | ^12.0 || | MIT | |
| v0.20.0 | ^8.4 | ^12.0 || | MIT | |
| v0.19.0 | ^8.4 | ^12.0 || | MIT | |
| v0.18.0 | ^8.4 | ^12.0 || | MIT | |
| v0.17.3 | ^8.4 | ^12.0 || | MIT | |
| v0.17.2 | ^8.4 | ^12.0 || | MIT | |
| v0.17.1 | ^8.4 | ^12.0 || | MIT | |
| v0.17.0 | ^8.4 | ^12.0 || | MIT | |
| v0.16.0 | ^8.4 | ^12.0 || | MIT | |
| v0.15.0 | ^8.4 | ^12.0 || | MIT | |
| v0.14.2 | ^8.4 | ^12.0 || | MIT | |
| v0.14.1 | ^8.4 | ^12.0 || | MIT | |
| v0.14.0 | ^8.4 | ^12.0 || | MIT | |
| v0.13.4 | ^8.4 | ^12.0 || | MIT | |
| v0.13.3 | ^8.4 | ^12.0 || | MIT | |
| v0.13.2 | ^8.4 | ^12.0 || | MIT |
Showing the latest 30 of 45. See every release on Packagist