Discord

socialiteproviders/discord image

Discord stats

Downloads
600.3K
Stars
33
Open Issues
0
Forks
14

View on GitHub →

Discord OAuth2 Provider for Laravel Socialite

Laravel Discord Package Summary

The socialiteproviders/discord package integrates Discord authentication into Laravel applications using the Socialite package. This allows developers to easily implement user authentication through Discord with minimal configuration.

Key Features:

  • Seamless Integration: Works with Laravel's existing Socialite package to handle OAuth flows.
  • Customizable: Offers options to specify GIF avatars and default avatar extension (jpg, png, webp).
  • User Data Access: Provides access to Discord user fields such as id, nickname, name, email, and avatar.

Installation and Configuration:

  1. Install the package using Composer:

    composer require socialiteproviders/discord
  2. Configure services by adding Discord credentials in config/services.php:

    'discord' => [
    'client_id' => env('DISCORD_CLIENT_ID'),
    'client_secret' => env('DISCORD_CLIENT_SECRET'),
    'redirect' => env('DISCORD_REDIRECT_URI'),
    'allow_gif_avatars' => (bool)env('DISCORD_AVATAR_GIF', true),
    'avatar_default_extension' => env('DISCORD_EXTENSION_DEFAULT', 'jpg'),
    ],
  3. Set up the event listener in app/Providers/EventServiceProvider to handle SocialiteWasCalled events:

    protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
    \SocialiteProviders\Discord\DiscordExtendSocialite::class.'@handle',
    ],
    ];

Usage:

After configuration, you can initiate authentication with:

return Socialite::driver('discord')->redirect();

This package provides a straightforward way to authenticate users with Discord in a Laravel application, leveraging the power of Socialite for a smooth integration.

SocialiteProviders photo

Socialite Providers for Laravel

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Socialiteproviders Discord Related Articles

Monitor Laravel Queues, Commands, and Schedulers on Any Driver with Vigilance image

Monitor Laravel Queues, Commands, and Schedulers on Any Driver with Vigilance

Read article
LaraOwl: Self-Hosted Monitoring for Laravel Applications image

LaraOwl: Self-Hosted Monitoring for Laravel Applications

Read article
Debugging production Laravel apps without losing your mind image

Debugging production Laravel apps without losing your mind

Read article
Filament turns five in style! image

Filament turns five in style!

Read article
AI-Driven Development Insiders Launch: 500 Seats. 24 Hours. 50% Off image

AI-Driven Development Insiders Launch: 500 Seats. 24 Hours. 50% Off

Read article
Announcing Inertia 2.0: Redefining Frontend Development for Laravel image

Announcing Inertia 2.0: Redefining Frontend Development for Laravel

Read article
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud