Support the ongoing development of Laravel.io →
Authentication Security
Last updated 1 year ago.
0

You perform the auth against facebook, if it passes then you create a User object in memory, when they log out it will destroy that user unless you are saving them in your app as well.

//create empty user obj
$FBuser = new User;


//Manually log in user
Auth::login($FBuser);

if you wanted to save the user each time, you can do this.


$Auser = new User;
$Auser->id = $username;
$Auser->name = $username;
$Auser->username = $username;
$Auser->email = $email;
$Auser->save();
$FBuser = User::find($username);
Auth::login($FBuser);
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.