SC009 - Forgot Password and Password Reset in Laravel 8

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends in this video we are going to show you how you can implement forgot password functionality and reset password in laravel 8. let's login to show you login process as you can see we are on dashboard let's log out now sometimes you may forgot your password today we are going to see how to reset password to do that we have to update dot n file mail variables we will use gmail account to send email let's see some gmail account configuration choose your email you want to use then click on manage your google account button here then click on security scroll down in order to achieve this you have to turn on less secure app access as you can see my account less secure app access is turned off let's click here to turn on less secure app access then click on this toggle check as you can see the less secure app access is turned on to this email account after doing that google sent email notification that show us the changes happen to account now we have turned on less secure app access on gmail account let's continue back to dot n file and update it then use here email that you had set to less secure app access here you can define sender name save file and run php artisan serve command again let's update this link root value that will bring us to forgot password page this is the default forgot password page provided by laravel after generating laravel auth ui as i mentioned before i used to use my own layouts i will use this on forgot password page and this on reset password page i'm going to rename this and create my own as you can see this page has been updated don't forget csrf on this form let's add this if directive that will show us the status then add error span that will show us validation errors let's update reset password page also don't forget to add csrf to this form just add this input hidden field let's add root name to our forms action attributes let's now update reset password controller php file just import user model here and define redirect function here let's test we used this user info for login now suppose i forgot password just use your registered email address as you can see we have message that show us that the reset link has been sent by looking in our password underscore resets table we see the generated record according to my email address let's take a look in gmail inbox as you can see received forgot password notification just click on this reset password button the enter your new password as you can see our password has been resetted successfully by looking in our password underscore resets table we don't have any record let's see if this user is normal user role just enter email address then add new password as you can see both admin and normal users can reset their passwords thanks for watching this video
Info
Channel: Irebe Library
Views: 10,915
Rating: undefined out of 5
Keywords: irebe library, forgot password, reset password
Id: J0CxA54z-3A
Channel Id: undefined
Length: 13min 46sec (826 seconds)
Published: Tue May 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.