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

besrabasant's avatar

Laravel Passport Authentication

I am using Laravel 5.4 as back-end for my ReactJS front-end. I have added the laravel passport package for authentication and using the password grant for authenticating my users. The issue that I am having with my set up is that when ever the access token expires I am being show an error - "the Login Route has not been defined." I want to avoid that and instead send me back a response as json with something describing to login again into my application. The Login form is in the ReactJS front-end and I am sending my login request through ajax.

Am I using passport incorrectly?

0 likes
0 replies

Please or to participate in this conversation.