Fixed 2FA middleware

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-05-13 12:45:54 -07:00
parent 293e3e02e4
commit 32bbe7c715

View file

@ -395,26 +395,12 @@ Route::group(['prefix' => 'setup', 'middleware' => 'web'], function () {
)->name('setup');
});
Route::middleware(['web'], function () {
Route::get(
'two-factor-enroll',
[LoginController::class, 'getTwoFactorEnroll']
)->name('two-factor-enroll');
Route::get(
'two-factor',
[LoginController::class, 'getTwoFactorAuth']
)->name('two-factor');
Route::post(
'two-factor',
[LoginController::class, 'postTwoFactorAuth']
);
});
Route::group(['middleware' => 'web'], function () {
Route::get(
'login',
[LoginController::class, 'showLoginForm']
@ -425,6 +411,38 @@ Route::group(['middleware' => 'web'], function () {
[LoginController::class, 'login']
);
Route::get(
'two-factor-enroll',
[
'as' => 'two-factor-enroll',
'middleware' => ['web'],
'uses' => 'Auth\LoginController@getTwoFactorEnroll' ]
);
Route::get(
'two-factor',
[
'as' => 'two-factor',
'middleware' => ['web'],
'uses' => 'Auth\LoginController@getTwoFactorAuth' ]
);
Route::post(
'two-factor',
[
'as' => 'two-factor',
'middleware' => ['web'],
'uses' => 'Auth\LoginController@postTwoFactorAuth' ]
);
Route::get(
'/',
[
'as' => 'home',
'middleware' => ['auth'],
'uses' => 'DashboardController@getIndex' ]
);
Route::get(
'logout',
[LoginController::class, 'logout']