|
53 | 53 | Route::post('register-interest', 'RegisterInterestController@registerInterest');
|
54 | 54 | });
|
55 | 55 |
|
56 |
| -// Routes in the following group can only be access once logged-in |
57 |
| -Route::middleware(['auth'])->group(function () { |
| 56 | +// Routes in the following group can only be access once logged-in and if enabled valid 2fa |
| 57 | +Route::middleware(['auth', '2fa'])->group(function () { |
58 | 58 | Route::view('registration-complete', 'pages.registrationComplete')->name('registrationComplete');
|
59 | 59 |
|
60 | 60 | // Users (show, edit, update) to allow users to update there email if they can't verify it
|
|
67 | 67 | );
|
68 | 68 | });
|
69 | 69 |
|
70 |
| -// Routes in the following group can only be access once logged-in and have verified your email address |
71 |
| -Route::middleware(['auth', 'verified', '2fa'])->group(function () { |
72 |
| - Route::get('home', 'HomeController@index')->name('home'); |
73 |
| - Route::get('access-codes', 'HomeController@accessCodes')->name('accessCodes'); |
74 |
| - |
| 70 | +// Routes in the following group can only be access once logged-in and have verified your email address but do not require 2fa |
| 71 | +Route::middleware(['auth', 'verified'])->group(function () { |
75 | 72 | // 2fa Auth
|
76 | 73 | Route::get('2fa', 'Auth\TwoFactorAuthenticationController@show2faForm')->name('2fa');
|
77 | 74 | Route::post('2fa/generate2faSecret', 'Auth\TwoFactorAuthenticationController@generate2faSecret')
|
78 | 75 | ->name('2fa.generate2faSecret');
|
79 | 76 | Route::post('2fa', 'Auth\TwoFactorAuthenticationController@enable2fa')->name('2fa.enable2fa');
|
80 | 77 | Route::post('2fa/disable2fa', 'Auth\TwoFactorAuthenticationController@disable2fa')->name('2fa.disable2fa');
|
| 78 | +}); |
| 79 | + |
| 80 | +// Routes in the following group can only be access once logged-in and have verified your email address and if enabled valid 2fa |
| 81 | +Route::middleware(['auth', 'verified', '2fa'])->group(function () { |
| 82 | + Route::get('home', 'HomeController@index')->name('home'); |
| 83 | + Route::get('access-codes', 'HomeController@accessCodes')->name('accessCodes'); |
81 | 84 |
|
82 | 85 | // ROLE
|
83 | 86 | Route::get('roles', 'RoleController@index')->name('roles.index');
|
|
0 commit comments