Skip to content

Commit e5f3678

Browse files
committed
Fix login routes
1 parent 5927e0e commit e5f3678

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

app/Providers/RouteServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function map()
4141
->namespace($this->namespace . '\Admin')
4242
->group(base_path('routes/admin.php'));
4343

44-
Route::middleware(['web', 'guest', 'csrf'])->prefix('/auth')
44+
Route::middleware(['web', 'csrf'])->prefix('/auth')
4545
->namespace($this->namespace . '\Auth')
4646
->group(base_path('routes/auth.php'));
4747

resources/lang/en/auth.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
'request_reset' => 'Locate Account',
1818
'2fa_required' => '2-Factor Authentication',
1919
'2fa_failed' => 'The 2FA token provided was invalid.',
20+
'totp_failed' => 'There was an error while attempting to validate TOTP.',
2021
];

routes/auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
* SOFTWARE.
2323
*/
2424

25-
Route::get('/logout', 'LoginController@logout')->name('auth.logout');
25+
Route::get('/logout', 'LoginController@logout')->name('auth.logout')->middleware('auth');
2626
Route::get('/login', 'LoginController@showLoginForm')->name('auth.login');
2727
Route::get('/login/totp', 'LoginController@totp')->name('auth.totp');
2828
Route::get('/password', 'ForgotPasswordController@showLinkRequestForm')->name('auth.password');
2929
Route::get('/password/reset/{token}', 'ForgotPasswordController@showResetForm')->name('auth.reset');
3030

3131
Route::post('/login', 'LoginController@login')->middleware('recaptcha');
32-
Route::post('/login', 'LoginController@totpCheckpoint');
32+
Route::post('/login/totp', 'LoginController@totpCheckpoint');
3333
Route::post('/password/reset', 'ResetPasswordController@reset')->name('auth.reset.post')->middleware('recaptcha');
3434
Route::post('/password/reset/{token}', 'ForgotPasswordController@sendResetLinkEmail')->middleware('recaptcha');

0 commit comments

Comments
 (0)