Adding support to login via discord oauth.
This commit is contained in:
parent
910a8309b7
commit
8fd07c11a8
10 changed files with 112 additions and 0 deletions
16
routes/oauth.php
Normal file
16
routes/oauth.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
use App\Http\Controllers\Auth\OAuthController;
|
||||
|
||||
$drivers = [
|
||||
'discord'
|
||||
];
|
||||
|
||||
Route::prefix('/oauth/{driver}')
|
||||
->where([ 'driver' => collect($drivers)->join('|') ])
|
||||
->name('oauth.')->group(function () {
|
||||
|
||||
Route::get('/', [ OAuthController::class, 'create' ])->name('create');
|
||||
Route::get('/callback', [ OAuthController::class, 'store' ])->name('store');
|
||||
});
|
||||
|
|
@ -10,6 +10,8 @@ use App\Http\Controllers\RecipeController;
|
|||
|
||||
use App\Http\Controllers\Auth\SessionController;
|
||||
|
||||
require "oauth.php";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|
|
|
|||
Reference in a new issue