This might be helpful if you're using a different service for storing users: https://laravel.com/docs/7.x/authentication#adding-custom-user-providers - I haven't done it myself though but maybe someone else has implemented this?
Nov 6, 2020
3
Level 2
Auth::login a User instance
When using Auth::login($user) is it possible to login (and so a session is created) a $user instance created on the fly. For example:
$user = new User();
$user->id = 15;
$user->name = "User Name";
$user->email = "test";
$user->password = "test";
Auth::login($user);
The reason for this is that I am storing my users in another Database 'app' in another Laravel project. Thus when a user logs in from this dashboard, I'd like the credentials to be verified in project 'app' through an API call and then return back information such as user_id and create a session in this Laravel project.
Please or to participate in this conversation.