diff --git a/src/app/Actions/Fortify/CreateNewUser.php b/src/app/Actions/Fortify/CreateNewUser.php index e5bfb06..a095c34 100644 --- a/src/app/Actions/Fortify/CreateNewUser.php +++ b/src/app/Actions/Fortify/CreateNewUser.php @@ -1,5 +1,7 @@ $input['name'], 'email' => $input['email'], 'password' => Hash::make($input['password']), - 'role_uuid' => Role::where('code','user')->first()->uuid + 'role_uuid' => Role::where('code', 'user')->first()->uuid ]); } } diff --git a/src/app/Actions/Fortify/PasswordValidationRules.php b/src/app/Actions/Fortify/PasswordValidationRules.php index 76b19d3..2554a91 100644 --- a/src/app/Actions/Fortify/PasswordValidationRules.php +++ b/src/app/Actions/Fortify/PasswordValidationRules.php @@ -1,5 +1,7 @@ belongsTo(Role::class, 'role_uuid', 'uuid'); } diff --git a/src/app/Providers/FortifyServiceProvider.php b/src/app/Providers/FortifyServiceProvider.php index 165a3e3..1c4f8d1 100644 --- a/src/app/Providers/FortifyServiceProvider.php +++ b/src/app/Providers/FortifyServiceProvider.php @@ -1,5 +1,7 @@ input(Fortify::username())).'|'.$request->ip()); + $throttleKey = Str::transliterate(Str::lower($request->input(Fortify::username())) . '|' . $request->ip()); return Limit::perMinute(5)->by($throttleKey); }); diff --git a/src/config/fortify.php b/src/config/fortify.php index 726d83b..0b6608e 100644 --- a/src/config/fortify.php +++ b/src/config/fortify.php @@ -1,5 +1,7 @@ assertRedirect('/'); expect(auth()->check())->toBeFalse(); -}); \ No newline at end of file +});