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

rishikeshdeveloper's avatar

passport not working without php artisan serve

Hi everyone I am using Laravel 5.7 and installed Passport when I am testing API after running php artisan serve in local it's working fine but when I deploy project on server it's always says Unauthenticated

I have also tried:

php artisan passport:keys

php artisan optimize:clear

as well as cleared all cache and config.

please help me.

Thanks.

0 likes
2 replies
ismaile's avatar

Have you run the following commands on the server ?

composer require laravel/passport
php artisan migrate
php artisan passport:install

If not, please try it and let us know.

Please or to participate in this conversation.