auth0/jwt-auth-bundle
Symfony bundle for Auth0 authentication and management APIs. Supports PHP 8.1+ and Symfony 6.4/7/8. Install via Composer, configure domain/client credentials and callback/logout URLs, then use the SDK for login, tokens, and user sessions.
⚠️ This is a beta release. It moves the bundle onto auth0-php v9, which rewrites the Management API. The Authentication API is unchanged. Please consult the 5.x to 6.x Upgrade Guide before upgrading.
This release makes the Auth0 Symfony SDK compatible with auth0-php v9. The bundle wraps the Authentication API, which is unchanged in v9, so authentication flows require no changes. The one source-level addition is a new, idiomatic entry point for the rewritten Management API.
getManagement() accessor - Service::getManagement() returns a ManagementClient wrapper built from your existing bundle configuration (domain, client_id, client_secret), with automatic OAuth 2.0 client credentials token management and PSR-6 caching$client->users->list()), and built-in Pager<T> pagination, all surfaced through the bundleThe Authentication surface is completely unchanged. Login, logout, callback, and token handling work exactly as before.
The Management API entry point has changed:
| Area | 5.x | 6.x |
|---|---|---|
| Entry point | $auth0->getSdk()->management() |
$auth0->getManagement() |
| Sub-client access | ->users()->getAll() |
->users->list() |
| Request params | Associative arrays | Typed classes (ListUsersRequestParameters) |
| Responses | ResponseInterface + HttpResponse::decodeContent() |
Typed objects ($user->getEmail()) |
| Pagination | HttpResponsePaginator |
foreach ($pager as $user) |
getSdk()->management()is non-functional with auth0-php v9 and throws aTypeError. UsegetManagement()instead.
composer require auth0/symfony:6.0.0-beta.0
use Auth0\SDK\API\Management\Users\Requests\ListUsersRequestParameters;
use Auth0\Symfony\Service;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
// The bundle registers its service under the id `auth0`, so autowire it by id.
public function __construct(
#[Autowire(service: 'auth0')]
private Service $auth0,
) {
}
$management = $this->auth0->getManagement();
$users = $management->users->list(
new ListUsersRequestParameters(['perPage' => 25])
);
foreach ($users as $user) {
echo $user->getEmail();
}
auth0/auth0-php dependency from ^8.19 to ^9.08.1 to 8.2getSdk()->management() is non-functional with auth0-php v9; use the new getManagement() accessor insteadThis is a beta release - we would love your feedback! Please open an issue if you encounter any problems or have suggestions.
Added
Fixed
Fixed
Request::get() methods to use explicit parameter bag methods for Symfony compatibilityFixed
Fixed
Fixed
Fixed
This release includes experimental community-contributed support for Symfony 7. If you encounter any issues, please open an issue on GitHub.
Added
Changed
Fixed
Changed
Added
Changed
auth0-php dependency version range to ^8.10.8.1.^6.4.
^7.0 support will be added in a forthcoming release.[!NOTE] ¹ To use this feature, an Auth0 tenant must have support for it enabled.
Added
Changed
auth0-php dependency version range to ^8.7.symfony package name (previously jwt-auth-bundle.)Note ¹ To use this feature, an Auth0 tenant must have support for it enabled. This feature is not yet available to all tenants.
We are excited to announce the release of V5.0 of Auth0's Symfony SDK! This version is a complete rewrite of our Symfony bundle, and includes full support for PHP 8.1 and Symfony 6.1. It also includes numerous new features and greatly expanded functionality, including:
This release represents a significant upgrade to the API of our bundle, and we'd encourage you to refer to our updated README.md for usage of the new release, and guidance on upgrading your Symfony application. We hope you enjoy this new version and all the features it has to offer. Thank you for using Auth0!
Note: As of this release, we have renamed the package to
auth0/symfony(previouslyauth0/jwt-auth-bundle) so as to better clarify the elevated functionality of the SDK into a full Auth0 integration with this release. We have marked theauth0/jwt-auth-bundlepackage as deprecated with Packagist to inform customers of this change. Simply update yourcomposer.jsonto reference the new package name to continue receiving updates.
Warning This is a beta release and is subject to breaking changes. It is not recommended for production use, but your feedback and help in testing is appreciated!
Note This package will be renamed once 5.0 is released. Users of previous releases will begin receiving a deprecation notice in Composer to upgrade their projects to 5.0 and use the new package name, at their earliest convenience.
Version 5.0 of Auth0's Symfony SDK introduces a number of exciting new features, including full support for PHP 8.0+ and Symfony 6.1+, an upgrade to Auth0's latest Auth0-PHP SDK v8, and full authentication support. The bundle has been completely rewritten to take advantage of the latest Symfony security APIs, and uses an updated configuration format that is more accessible and simpler to maintain, among other improvements.
BETA-1 adds support for Symfony's cache and session components, enabling you to leverage those built-in APIs and more easily integrate the SDK within your existing application stacks.
Added
Fixed
Please review the updated README.md for guidance on updating your application.
Warning This is a beta release and is subject to breaking changes. It is not recommended for production use, but your feedback and help in testing is appreciated!
Note This package will be renamed once 5.0 is released. Users of previous releases will begin receiving a deprecation notice in Composer to upgrade their projects to 5.0 and use the new package name, at their earliest convenience.
Version 5.0 of Auth0's Symfony SDK introduces a number of exciting new features, including full support for PHP 8.0+ and Symfony 6.1+, an upgrade to Auth0's latest Auth0-PHP SDK v8, and full authentication support. The bundle has been completely rewritten to take advantage of the latest Symfony security APIs, and uses an updated configuration format that is more accessible and simpler to maintain, among other improvements.
BETA-0 focuses on the migration of the core classes to the new bundle structure and security APIs. BETa1 will expand support for Symfony's integrated caching mechanisms.
Please review the updated README.md for guidance on updating your application.
This release introduces PHP 8.0 support and upgrades the bundle to use Auth0's PHP SDK 7.x branch. It also includes expanded JWT validation options, upgraded caching support, a simplified configuration format, and other improvements.
This release includes potential breaking changes that may require minor changes to host applications to support. Please review UPGRADING.md for guidance on updating your application.
Added
Changed
How can I help you explore Laravel packages today?