2 months ago

Upgrade to Laravel 6.18.35 breaks auth:api route authentication

Posted 2 months ago by chrisje59

Just in case it may save someone's day, I want to share an issue I resolved earlier today.

After running a Composer update, the API routes were failing authentication with Error 401! After some hours l hours of desperate search, I decided to try and update laravel/passport after which all was working fine again.

The flow

$ composer update
$ npm run dev

The above included an update of Laravel 6.18.25 to 6.18.35 that seems to have broken all auth:api routes; failing with “401”

$ composer require laravel/passport
$ npm run dev

This updated Laravel Passport from 8.4 to 9.3, which fixed the issue.

Would there have been a way to avoid falling into this update trap?

Please sign in or create an account to participate in this conversation.