refactor: revert oauth routes

This commit is contained in:
Scai 2025-01-06 20:01:29 +02:00
parent 17bb23b5b8
commit 8049ef462e
2 changed files with 9 additions and 0 deletions

View File

@ -35,6 +35,8 @@ class RouteServiceProvider extends ServiceProvider
Route::middleware(['auth.session', RequireTwoFactorAuthentication::class])
->group(base_path('routes/base.php'));
Route::middleware('guest')->prefix('/auth')->group(base_path('routes/auth.php'));
});
Route::middleware(['api', RequireTwoFactorAuthentication::class])->group(function () {

7
routes/auth.php Normal file
View File

@ -0,0 +1,7 @@
<?php
use Illuminate\Routing\Route;
use App\Http\Controllers\Auth;
Route::get('/oauth/redirect/{driver}', [Auth\OAuthController::class, 'redirect'])->name('auth.oauth.redirect');
Route::get('/oauth/callback/{driver}', [Auth\OAuthController::class, 'callback'])->name('auth.oauth.callback')->withoutMiddleware('guest');