You can authenticate users by id or object by using:
Auth::login($user)
or
Auth::loginUsingId(5)
So you can basically get the right user model from your database on your oauth callback and simply log him in.
Thank you for your response. But im trying to login the user with specific column name 'authid'. My columns are
id | authid | name | avatar
Thanks!
$user = User::where('authid', '=', $authId)->first();
Auth::login($user);
That should do the trick.
Thank you a lot. I will check it later and mark as Solution. Have a nice day.
P.S (and i was thinking of making a new AuthProvider) ;D
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community