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

DennisEilander's avatar

Authenticate user with session using Laravel Passport

I'm building a laravel application where we have the client and authentication servers separated from each other, using Laravel passport password tokens.

The authentication form client server to authentication server is successful, I got the token I need. But how do I authenticate the current authenticated user on the client side too.

I mean, the user is authenticated on the authentication server but, I need to authenticate that user, so that the user can access the web routes, protected with the auth middleware.

Note

The users are stored in the authentication server

Flow

Client login form --> http://auth.test/oauth/token --> user = authenticated

Client <-- redirect with token <-- Auth server

Client keeps seeing the login screen

0 likes
0 replies

Please or to participate in this conversation.