Archived
1
0
Fork 0

Adding support to login via discord oauth.

This commit is contained in:
Henrik Hautakoski 2021-06-30 18:30:34 +02:00
parent 910a8309b7
commit 8fd07c11a8
10 changed files with 112 additions and 0 deletions

16
routes/oauth.php Normal file
View 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');
});

View file

@ -10,6 +10,8 @@ use App\Http\Controllers\RecipeController;
use App\Http\Controllers\Auth\SessionController;
require "oauth.php";
/*
|--------------------------------------------------------------------------
| Web Routes