Package

Socialiteproviders Discord

Discord OAuth2 Provider for Laravel Socialite

Package

socialiteproviders/discord

View on GitHub →

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 Discord Related Articles

Laravel Discord Notification Channel image

Laravel Discord Notification Channel

Read article
Create Elegant Discord Bots with Laracord image

Create Elegant Discord Bots with Laracord

Read article
Come for the Simplicity, Stay for the Extensibility: Identity with FusionAuth image

Come for the Simplicity, Stay for the Extensibility: Identity with FusionAuth

Read article
Socialite Implementation for Laravel Jetstream image

Socialite Implementation for Laravel Jetstream

Read article
New Community Project: Laravel Notification Channels image

New Community Project: Laravel Notification Channels

Read article
Filament turns five in style! image

Filament turns five in style!

Read article

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

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

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

Shift

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum