feat: Add Laravel 8 and Passport 10 support with lcobucci/jwt v4 and nyholm/psr7 #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates the laravel-mongodb-passport package to support Laravel 8, Passport 10, and their updated dependencies. This is a breaking change that drops support for Laravel 6/7 and Passport 8/9.
Key changes:
laminas/diactorostonyholm/psr7(required by Passport 10)lcobucci/jwtv3.3.3 to v4.0+ with new API (claims()->get()instead ofgetClaim())new ServerRequest('POST', '')Passport::$hashesClientSecretsfeatureReview & Testing Checklist for Human
'POST', ''as required args - confirm this works correctly with the OAuth2 authorization serverPersonalAccessTokenFactory::make()in auth-api to ensure tokens are created and parsed correctlyclaims()->get('jti')call infindAccessToken()is critical for token lookup - ensure this returns the correct token ID$jwtparameter is now optional/untyped - verify this doesn't break dependency injection in consuming applicationsRecommended test plan:
PersonalAccessTokenFactory(e.g.,CustomOAuthEndpointsTest::testSingleCodeLogin*tests)Notes
This PR is part of the Laravel 8 upgrade for auth-api. The auth-api upgrade depends on these changes to fix 500 errors in tests that use
PersonalAccessTokenFactory.Link to Devin run: https://app.devin.ai/sessions/da4c6724a60445beb1dadd33270c5551
Requested by: james.osullivan@theaccessgroup.com