Support the ongoing development of Laravel.io →
Configuration Authentication Installation
Last updated 2 years ago.
0

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.

0

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!

0
$user = User::where('authid', '=', $authId)->first();
Auth::login($user);

That should do the trick.

0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

xscence xscence Joined 22 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.