matondojk/filament-social-login

A beautiful, plug-and-play social login integration for modern Filament PHP panels.

Maintainers

Package info

github.com/matondojk/filament-social-login

pkg:composer/matondojk/filament-social-login

Transparency log

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-07-28 16:23 UTC

This package is auto-updated.

Last update: 2026-07-28 16:54:38 UTC


README

A beautiful, plug-and-play social login integration for modern Filament PHP panels (v3/v4/v5). Supports Google, Facebook, GitHub, LinkedIn, and Microsoft OAuth seamlessly, and automatically retrieves user avatars.

Light Mode

Light Mode

Dark Mode

Dark Mode

Table of Contents

Installation

  1. Install the package via composer:
composer require matondojk/filament-social-login
  1. Publish the configuration and migration:
php artisan vendor:publish --tag="filament-social-login-config"
php artisan vendor:publish --tag="filament-social-login-migrations"

(You can also publish views and translations if you want to customize them)

php artisan vendor:publish --tag="filament-social-login-views"
php artisan vendor:publish --tag="filament-social-login-translations"
  1. Run the migrations:
php artisan migrate
  1. Prepare your User Model to accept the new fields and display the Avatar: In app/Models/User.php, implement the HasAvatar interface:
use Filament\Models\Contracts\HasAvatar;

class User extends Authenticatable implements HasAvatar
{
    protected $fillable = [
        'name', 'email', 'password', 'provider', 'provider_id', 'avatar_url' // <-- add the new fields
    ];

    public function getFilamentAvatarUrl(): ?string
    {
        return $this->avatar_url;
    }
}
  1. Register the plugin in your Panel Provider (e.g., app/Providers/Filament/AdminPanelProvider.php):
use Matondojk\FilamentSocialLogin\FilamentSocialLoginPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(FilamentSocialLoginPlugin::make())
        // ...
}

Configuration

In your .env file, you can enable/disable providers and set your credentials. Only enabled providers will be shown on the login screen. The package automatically injects these into config/services.php for you!

SOCIAL_LOGIN_REDIRECT=/admin

SOCIAL_LOGIN_GOOGLE_ENABLED=true
SOCIAL_LOGIN_FACEBOOK_ENABLED=false
SOCIAL_LOGIN_GITHUB_ENABLED=false
SOCIAL_LOGIN_LINKEDIN_ENABLED=true
SOCIAL_LOGIN_MICROSOFT_ENABLED=true

GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REDIRECT_URI="${APP_URL}/auth/google/callback"

Obtaining Social Credentials

For instructions on how to create the OAuth apps and obtain the CLIENT_ID and CLIENT_SECRET for each provider, please refer to the official Laravel Socialite Documentation (v13.x).

Note: Ensure your exact REDIRECT_URI (e.g., https://your-app.com/auth/google/callback) is added to the allowed redirect URIs in the provider's developer console!

Microsoft & LinkedIn Support

This package relies on Laravel Socialite natively for Google, Facebook and GitHub. For Microsoft and LinkedIn OpenID, be sure to install the community providers if you need them:

composer require socialiteproviders/microsoft socialiteproviders/linkedin-openid

License

MIT