auth0/auth0-php
The official Auth0 PHP SDK for Authentication and Management APIs. Build PHP 8.2+ apps with PSR-18/17/7 HTTP support and tailored Laravel, Symfony, and WordPress SDKs. Includes quickstarts for session-based web apps and token-protected backend APIs.
Added
Note: As this is a major release it is recommended to understand the Breaking Changes section before upgrading. The v9 Migration Guide and UPGRADE.md contain details on the version upgrade.
v9.0.0 is the first stable release of the v9 line. The Management API client is now generated from Auth0's OpenAPI specification via Fern, with strongly-typed requests and responses, built-in pagination, and automatic token management through the ManagementClient wrapper.
Management API
new Management(token: ...) with sub-clients as public properties)Auth0::management() removed, use the ManagementClient wrapper insteadgetAll() renamed to list() across every endpoint, and sub-resource operations moved to dedicated sub-clientsgrants() renamed to userGrants, and usersByEmail() merged into users->listUsersByEmail()Authentication API
client_id, response_type, and response_mode can no longer be overridden through the $params argument on Auth0::login(), Auth0::signup(), Auth0::handleInvitation(), Authentication::getLoginLink(), and the Pushed Authorization Request flow. They are always resolved from your SdkConfiguration. If you previously passed any of these through $params they are now ignored in favor of the configured valueAuth0::handleBackchannelLogout() now stores cache entries with the configured relative expiry (backchannelLogoutExpires, default 30 days) instead of an absolute timestamp. If you ran a persistent backchannel logout cache on 8.10.0 or later, flush it once after upgrading to clear the old long-lived entriesAuthentication::customTokenExchange() and Auth0::loginWithCustomTokenExchange(), exchanging an external or legacy token for Auth0 tokens without a browser redirectAdded
Fixed
Added
Added
Fixed
Breaking Changes
ConnectionAttributeIdentifier to EmailAttributeIdentifier #838 (fern-api[bot])None case on PhoneProviderProtectionBackoffStrategyEnum with Default #838 (fern-api[bot])Added
Fixed
Added
Added
Breaking Changes
ResponseInterface->users) instead of methods (->users())getAll() to list()Pager<T> instead of HttpResponsePaginatorAuth0ApiException instead of returning error responsesAdded
ManagementClient wrapper with built-in OAuth 2.0 client credentials token managementPager<T> pagination with automatic page fetchingAuth0-Client, User-Agent) on Management API requestsUPGRADE.md v8 to v9 migration guideUnchanged
Auth0\SDK\API\Authentication) - no changesAuth0\SDK\Auth0 entry point class - no changesFixed
Changed
Added
Fixed
Added
feat: Adding Support For BYOK #782 (kishore7snehil)
feat: Validation Test Case For Show as Button Parameter #783 (kishore7snehil)
Fixed
Added
feat: Adding client credentials support #775 (kishore7snehil)
feat: Adding Support For CYOK #779 (kishore7snehil)
Fixed
Fixed
Added
Added
Changed
Fixed
Fixed
Added
Note ¹ To use this feature, an Auth0 tenant must have support for it enabled. This feature is not yet available to all tenants.
Added
Auth0\SDK\API\Authentication\PushedAuthorizationRequest is a new class for issuing Pushed Authorization Requests and producing authorization links for them.Auth0\SDK\API\Authentication::pushedAuthorizationRequest() has been added as a shortcut method for returning a configured instantiation of the above class.Auth0\SDK\Auth0::login() has been updated to support issuing Pushed Authorization Requests and returning authorization links for them.Auth0\SDK\Configuration\SdkConfiguration has been updated to accept a pushedAuthorizationRequest boolean to enable this feature.Auth0\SDK\Auth0::isAuthenticated() has been added as a shortcut method. It is an alias for getCredentials() !== null.Note ¹ To use this feature, an Auth0 tenant must have support for it enabled. This feature is not yet available to all tenants.
This release improves the SDK's automatic discovery process of compatible HTTP clients, factories and messages (PSR-18, 17 and 7, respectively). If you encounter issues with your implementation not being discovered, please open an issue.
This release also introduces support for a number of additional Management API endpoints.
Added
State Management
Auth0\SDK\Auth0::refreshState() to force a refresh of the SDK's internal state. This is useful when you have updated the SDK's configuration and want to ensure the SDK is using the latest values.Management API
Auth0\APIs\Management\Users
DELETE /users/:id/authenticators → deleteAllAuthenticators() (#702) (Documentation)GET /api/v2/users/:user/authentication-methods → getAuthenticationMethods() (Documentation)PUT /api/v2/users/:user/authentication-methods → replaceAuthenticationMethods() (Documentation)DELETE /api/v2/users/:user/authentication-methods → deleteAuthenticationMethods(string user) (Documentation)POST /api/v2/users/:user/authentication-methods → createAuthenticationMethod() (Documentation)GET /api/v2/users/:user/authentication-methods/:method → getAuthenticationMethod() (Documentation)PATCH /api/v2/users/:user/authentication-methods/:method → updateAuthenticationMethod() (Documentation)DELETE /api/v2/users/:user/authentication-methods/:method → deleteAuthenticationMethod() (Documentation)Fixed
Auth0\SDK\API\Authentication with manually assigned client_id or client_secret parameters could have those values overwritten by the SDK's assigned configuration. #705Changed
php-http/discovery dependency with psr-discovery/all.php-http/httplug dependency with psr-discovery/all.ergebnis/composer-normalize as it now runs in CI.firebase/php-jwt as it was replaced by an in-library generator.hyperf/event with symfony/event-dispatcher.laravel/pint with friendsofphp/php-cs-fixer.nyholm/psr7 with psr-mock/http-factory-implementation.php-http/mock-client with psr-mock/http-client-implementation.vimeo/psalm to 5.8.phpstan/phpstan to 1.10.rector/rector to 0.15.Thanks to our contributors for this release: knash94
Fixed
params as array under some conditions #670 (evansims)getItem() call in Auth0\SDK\Token\Verifier::getKeySet() #669 (pkivits-litebit)Added
Changed
samesite property #645 (evansims)getRequestParameter() filter to use FILTER_SANITIZE_FULL_SPECIAL_CHARS and allow passing extra filter options #642 (evansims)login() for transient cookies, and clear() #641 (evansims)Fixed
Auth0\SDK\Configuration\SdkConfiguration where customDomain was not properly formatted in some configurations, leading to inconsistencies in certain SDK functions, such as Token validation. customDomain is now formatted identically to domain. #633 (evansims)Closed Issues
Many thanks to our community contributors for this release: elbebass, fullstackfool, jeromefitzpatrick, marko-ilic and sepiariver.
Added
Auth0\SDK\Auth0::getBearerToken() #620 (evansims)Auth0\SDK\Configuration\SdkConfiguration::STRATEGY_API #619 (evansims)Changed
Auth0\SDK\Exception\InvalidTokenException on JsonException #614 (marko-ilic)Auth0\SDK\Exception\NetworkException when Management API credential exchange fails #608 (sepiariver)Documentation Contributions
management configuration strategy (domain is required) #604 (fullstackfool)Other Improvements
Fixed
Auth0::decode() #534 (shadowhand)BEFORE YOU UPGRADE
8.0 Highlights
For a complete overview of API changes, please see UPGRADE.md.
For guidance on using the new configuration interface or SDK API, please see README.md.
Changelog entries for releases prior to 8.0 have been relocated to CHANGELOG.ARCHIVE.md.
How can I help you explore Laravel packages today?