Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

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

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
PHP and LLMs with Alfred Nutile image

PHP and LLMs with Alfred Nutile

Read article
Create Elegant Discord Bots with Laracord image

Create Elegant Discord Bots with Laracord

Read article
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Celebian logo

Celebian

Celebian is a social media marketing agency specializing in helping their clients go viral on TikTok. Whether you're looking to reach a bigger audience or gain more Tiktok followers, likes, and views, they've got you covered.

Celebian
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
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech
Statamic logo

Statamic

The drop-in ready Laravel CMS you’re been waiting for. Go full-stack or headless, flat file or database – it’s up to you.

Statamic