Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

javalos06's avatar

Laravel Passport deploy problem

Hi All,

I'm having an issue with Laravel Passport. I'm working on a Laravel API project, which is built using Docker. Every time I deploy, I regenerate the vendor folder with the following commands:

RUN /usr/local/bin/composer install RUN php artisan passport:install

However, running passport:install generates new private and public keys, causing my API users to become unauthenticated because their personal access tokens are invalidated.

How can I fix this? How do you build your Laravel projects with Passport?

Can you help me with this issue?

0 likes
0 replies

Please or to participate in this conversation.