From 681ac131e2b88a589783a25c5931861af6a6834d Mon Sep 17 00:00:00 2001 From: Mohammad Hafijul Islam Date: Mon, 16 Oct 2023 13:01:23 +0600 Subject: [PATCH] LP-4 send forgot password option moved to configurable option --- config/auth.php | 4 ++-- src/Http/Controllers/PasswordResetController.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/auth.php b/config/auth.php index d5abfb7..fefe4cd 100644 --- a/config/auth.php +++ b/config/auth.php @@ -24,8 +24,8 @@ | Exclude auth fields | Example: reset_link, otp, temporary_password */ - 'self_password_reset' => true, - 'password_reset_method' => 'otp', + 'self_password_reset' => false, + 'password_reset_method' => 'temporary_password', 'temporary_password_length' => 8, diff --git a/src/Http/Controllers/PasswordResetController.php b/src/Http/Controllers/PasswordResetController.php index a44b9a2..0def1da 100644 --- a/src/Http/Controllers/PasswordResetController.php +++ b/src/Http/Controllers/PasswordResetController.php @@ -59,8 +59,8 @@ public function update(PasswordResetRequest $request): JsonResponse { $request->validate([ 'token' => ['required'], - 'email' => ['required', 'email'], - 'password' => ['required', 'confirmed', Rules\Password::defaults()], + 'login_id' => ['required', 'email'], + 'password' => ['required', 'confirmed', 'min:8'], ]); // Here we will attempt to reset the user's password. If it is successful we