diff --git a/Web-Application/Fortify/app/Models/User.php b/Web-Application/Fortify/app/Models/User.php index 8101243..a6a0344 100644 --- a/Web-Application/Fortify/app/Models/User.php +++ b/Web-Application/Fortify/app/Models/User.php @@ -6,11 +6,12 @@ use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Laravel\Fortify\TwoFactorAuthenticatable; class User extends Authenticatable implements MustVerifyEmail { /** @use HasFactory<\Database\Factories\UserFactory> */ - use HasFactory, Notifiable; + use HasFactory, Notifiable, TwoFactorAuthenticatable; /** * The attributes that are mass assignable. diff --git a/Web-Application/Fortify/app/Providers/FortifyServiceProvider.php b/Web-Application/Fortify/app/Providers/FortifyServiceProvider.php index 1722cda..0d3d51a 100644 --- a/Web-Application/Fortify/app/Providers/FortifyServiceProvider.php +++ b/Web-Application/Fortify/app/Providers/FortifyServiceProvider.php @@ -63,5 +63,13 @@ class FortifyServiceProvider extends ServiceProvider Fortify::resetPasswordView(function (Request $request) { return view('auth.reset-password', ['request' => $request]); }); + + Fortify::confirmPasswordView(function () { + return view('auth.confirm-password'); + }); + + Fortify::twoFactorChallengeView(function () { + return view('auth.two-factor-challange'); + }); } } diff --git a/Web-Application/Fortify/config/fortify.php b/Web-Application/Fortify/config/fortify.php index 0551d1d..331eef3 100644 --- a/Web-Application/Fortify/config/fortify.php +++ b/Web-Application/Fortify/config/fortify.php @@ -150,7 +150,7 @@ return [ Features::updateProfileInformation(), Features::updatePasswords(), Features::twoFactorAuthentication([ - 'confirm' => true, + // 'confirm' => true, 'confirmPassword' => true, // 'window' => 0, ]), diff --git a/Web-Application/Fortify/resources/views/auth/confirm-password.blade.php b/Web-Application/Fortify/resources/views/auth/confirm-password.blade.php new file mode 100644 index 0000000..c93a426 --- /dev/null +++ b/Web-Application/Fortify/resources/views/auth/confirm-password.blade.php @@ -0,0 +1,39 @@ +@extends('app') + +@section('content') +
+ Please enter your secret code to login +
+ ++ Please enter your recovery code to login +
+ +