joselfonseca / lighthouse-graphql-passport-auth

Add GraphQL mutations to get tokens from passport for https://lighthouse-php.com/
https://lighthouse-php-auth.com/
MIT License
228 stars 56 forks source link

Feature/laravel-11 #177

Closed surajj2024 closed 2 weeks ago

surajj2024 commented 3 months ago

upgrad the passport version and jwt version

SlyDave commented 3 months ago

This doesn't work, you can't use jwt 5.0 with this package atm, larger changes are needed as password grants have been disabled by default and the refreshToken method has been removed.

surajj2024 commented 3 months ago

This doesn't work, you can't use jwt 5.0 with this package atm, larger changes are needed as password grants have been disabled by default and the refreshToken method has been removed.

Thanks for your response, Please suggest to me how can I upgrade my current project to Laravel 11.

SlyDave commented 2 months ago

Thanks for your response, Please suggest to me how can I upgrade my current project to Laravel 11.

I've had to fork the project and set "lcobucci/jwt": "^4.0" in composer.json Laravel 11 supports jwt 4.0 for now, so this does work, but in future this package is going to need to upgrade to jwt 5.0 which is a bit more involved

oh and set "laravel/passport": "^9.0 || ^10.0 || ^11.0",

Edit: turns out latest version of package forces jwt to 4.0, so all that is needed for Laravel 11 support is to add ^11.0 to the laravel/passport requirement. -- the same notice above applies; this allows the package to be installed by usage of jwt 4.0 is deprecated and will likely be removed in future versions of laravel passport.

joselfonseca commented 2 weeks ago

Done in this PR https://github.com/joselfonseca/lighthouse-graphql-passport-auth/pull/179