Filament: Login with Google/Facebook

Demonstrates how you can add Social Login buttons to your Filament project using Laravel Socialite.

Screenshot 2023-10-17 at 07.28.42

Get the Source Code:

How it works

In this example, you will find the following logic:

  • Install Socialite
  • Filament theme hooks to extend the login page and add two login buttons
  • Custom Controller to handle the Social Login redirect and callback
  • Two fields on the User model to store the Social Login ID

First, we need to install Socialite:

composer require laravel/socialite

Then, we can start adding our implementation. We will start with the Filament theme hooks to extend the login page and add two login buttons:

app/Providers/Filament/AdminPanelProvider.php

return $panel
// ...
->renderHook(
'panels::auth.login.form.after',
fn() => view('auth.socialLogin')
);

Then, we need to create the view...

The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 50 Premium Examples for $99 Only Form Examples for $39