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

Alexsi's avatar

Laravel User Authentication with external REST API

Hi, I need to authenticate users in Laravel by using a remote REST API. The API returns an instance of Laravel's User Model. I tried to create a custom guard, but once the user is retrieved, it's not stored in the session, so authentication fails. Can someone please explain me how to successfully authenticate users coming from a http remote call? Important: my user model got id, username and password, but no remember_token ATM. Thank you!

0 likes
1 reply

Please or to participate in this conversation.