Relative Content

Tag Archive for laravellaravel-bladenuxt3.jspinialaravel-sanctum

Google Authentication Avatar

public function callback() { $googleUser = Socialite::driver(‘google’)->user(); $user = User::updateOrCreate( [‘google_id’ => $googleUser->id], [ ‘name’ => $googleUser->name, ’email’ => $googleUser->email, ‘password’ => Str::password(12), ’email_verified_at’ => now(), ‘image’ => $googleUser->getAvatar(), ] ); the line gives the full path to the Google avatar and if you open it in a browser it works ‘image’ => $googleUser->getAvatar(), https://lh3.googleusercontent.com/a/ACg8ocLnBsb67U_duAICud3t95-OL5c4ujmno8osiI1KLh1lTy7p9k0=s96-c […]