Problem
You want to log a user in by the user id.
But, you want them only available in the current request.
Solution
Use the Auth::onceUsingId() method.
$success = Auth::onceUsingId($user_id);
if ( ! $success)
{
throw new Exception('failed!');
}
Discussion
This is similar to Auth::once().
But it doesn't do the authentication. You pass the $user_id and if the id is valid, the user is logged in for the current session.
