# Reset Password

An email is sent to the user's address to help him reset his password.

The user can access the reset password page by clicking the button found in the email. The link for resetting the password is available for 12 hours and is unique for the user. The user must add the password and confirm the password for his password to be updated.

The `App\Http\Livewire\Auth\ResetPassword` helps the user reset the password.

                    public function resetPassword() {
                        $this->validate();
                        $existingUser =  User::where('id', $this->urlID)->first();
                        if($existingUser) {
                            $existingUser->update([
                                'password' => Hash::make($this->password)
                            ]);
                        return redirect('/login');
                        } else {
                            $this->showFailureNotification = true;
                        }
                    }