diff --git a/app/User.php b/app/User.php index 1e76521..06f555f 100644 --- a/app/User.php +++ b/app/User.php @@ -7,11 +7,10 @@ use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Spatie\Permission\Traits\HasRoles; -class User extends Authenticatable +class User extends Authenticatable implements MustVerifyEmail { use Notifiable; use HasRoles; - //use MustVerifyEmail; /** * The attributes that are mass assignable. diff --git a/routes/web.php b/routes/web.php index ac80992..87a50da 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,7 +17,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function (){ - Auth::routes(); + Auth::routes(['verify' => true]); Route::post('/twofa/authenticate', 'Auth\TwofaController@verify2FA') ->name('verify2FA'); @@ -31,7 +31,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l ->name('sendSubmission'); - Route::group(['middleware' => ['auth', 'forcelogout', '2fa']], function(){ + Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function(){ Route::get('/dashboard', 'DashboardController@index') ->name('dashboard')