Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
forgot password add throttle
  • Loading branch information
bobimicroweber committed Feb 28, 2022
1 parent 3a6ed96 commit a3944cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/auth.php
Expand Up @@ -91,6 +91,7 @@
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
];
4 changes: 3 additions & 1 deletion src/MicroweberPackages/User/routes/api.php
Expand Up @@ -100,7 +100,9 @@
Route::any('logout', 'UserLoginController@logout')->name('logout');
Route::post('register', 'UserRegisterController@register')->name('register')->middleware(['allowed_ips']);

Route::post('/forgot-password', 'UserForgotPasswordController@send')->name('password.email');
Route::post('/forgot-password', 'UserForgotPasswordController@send')
->middleware(['throttle:3,1'])
->name('password.email');
Route::post('/reset-password', 'UserForgotPasswordController@update')->name('password.update');

Route::post('/profile-update', 'UserProfileController@update')->name('profile.update');
Expand Down
4 changes: 3 additions & 1 deletion src/MicroweberPackages/User/routes/web.php
Expand Up @@ -40,7 +40,9 @@
Route::post('email/verify-resend/{id}/{hash}', 'UserVerifyController@sendVerifyEmail')->name('verification.send');

Route::get('/forgot-password', 'UserForgotPasswordController@showForgotForm')->name('password.request');
Route::post('/forgot-password', 'UserForgotPasswordController@send')->name('password.email');
Route::post('/forgot-password', 'UserForgotPasswordController@send')
->middleware(['throttle:3,1'])
->name('password.email');

Route::get('/reset-password/{token}', 'UserForgotPasswordController@showResetForm')->name('password.reset');
Route::post('/reset-password', 'UserForgotPasswordController@update')->name('password.update');
Expand Down

0 comments on commit a3944cf

Please sign in to comment.