Fix login routes

This commit is contained in:
Dane Everitt 2017-04-01 21:18:56 -04:00
parent 5927e0e12a
commit e5f3678c62
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 4 additions and 3 deletions

View file

@ -41,7 +41,7 @@ class RouteServiceProvider extends ServiceProvider
->namespace($this->namespace . '\Admin')
->group(base_path('routes/admin.php'));
Route::middleware(['web', 'guest', 'csrf'])->prefix('/auth')
Route::middleware(['web', 'csrf'])->prefix('/auth')
->namespace($this->namespace . '\Auth')
->group(base_path('routes/auth.php'));

View file

@ -17,4 +17,5 @@ return [
'request_reset' => 'Locate Account',
'2fa_required' => '2-Factor Authentication',
'2fa_failed' => 'The 2FA token provided was invalid.',
'totp_failed' => 'There was an error while attempting to validate TOTP.',
];

View file

@ -22,13 +22,13 @@
* SOFTWARE.
*/
Route::get('/logout', 'LoginController@logout')->name('auth.logout');
Route::get('/logout', 'LoginController@logout')->name('auth.logout')->middleware('auth');
Route::get('/login', 'LoginController@showLoginForm')->name('auth.login');
Route::get('/login/totp', 'LoginController@totp')->name('auth.totp');
Route::get('/password', 'ForgotPasswordController@showLinkRequestForm')->name('auth.password');
Route::get('/password/reset/{token}', 'ForgotPasswordController@showResetForm')->name('auth.reset');
Route::post('/login', 'LoginController@login')->middleware('recaptcha');
Route::post('/login', 'LoginController@totpCheckpoint');
Route::post('/login/totp', 'LoginController@totpCheckpoint');
Route::post('/password/reset', 'ResetPasswordController@reset')->name('auth.reset.post')->middleware('recaptcha');
Route::post('/password/reset/{token}', 'ForgotPasswordController@sendResetLinkEmail')->middleware('recaptcha');