In my app, I would love to give an Admin user the ability to login as other users.
I'm trying to use auth ()->loginUsingId ($user->id) or auth()->login($user) but that methods doesnt exist in Sanctum's guard.
I can not figure out what is the correct way to implement this functionality.
Any tip?
Thanks!
The user guide is pretty good and its easy to use, so maybe consider using this? I have no used sanctum, so I am not sure if this does exactly what you need it too, but I think it probably would :)