feat: add Discord authentication framework
This commit is contained in:
23
app/Http/Controllers/Auth/DiscordController.php
Normal file
23
app/Http/Controllers/Auth/DiscordController.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
|
||||
class DiscordController extends Controller
|
||||
{
|
||||
|
||||
public function redirect() {
|
||||
|
||||
return Socialite::driver('discord')->redirect();
|
||||
|
||||
}
|
||||
|
||||
public function callback() {
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -49,6 +49,10 @@ class EventServiceProvider extends ServiceProvider
|
||||
Login::class => [
|
||||
LogAuthenticationSuccess::class,
|
||||
],
|
||||
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
||||
// ... other providers
|
||||
\SocialiteProviders\Discord\DiscordExtendSocialite::class.'@handle',
|
||||
],
|
||||
'App\Events\ApplicationApprovedEvent' => [
|
||||
'App\Listeners\PromoteUser',
|
||||
],
|
||||
|
Reference in New Issue
Block a user