If you use Passport and the provided middleware, everything will be done for you. As far as auth, I just create the views as Vue components and list the auth routes that I am using in api.php.
API Authentication with Vue and standard Authentication
I am developing a website right now that uses Laravel web routes for the pages and then it will call an api to retrieve the data in a vue component. There could be up to 3 different api's that are all separate projects.
I am thinking about using JWT for the api but not sure how I would make it were the session and the JWT are in sync with expiration times. I don't want the user to have to login in and then relogin to renew a JWT before the session has expired.
Is it possible to do what I want to do keep the session and JWT expirations in sync or are there any better ways to implement a better solution?
Please or to participate in this conversation.