Relative Content

Tag Archive for laravelsanctum

Laravel how to set auth user with login info received from external API (another Laravel app)

I have two separate Laravel apps, one is a restful API with database, another is the client without database. The client login through the API app with sanctum token, once the client received user info, is it possible to set auth user in client? So I can use things like auth()->user()->email or directives in blade files such as @can(‘permission’) to check logged-in user’s role & permissions. Thanks