Laravel 5.1 How to build forgot password functionality - laravel

I am using laravel 5.1 and I do not know how I should built in the functionality that a user can reset his / her password.
Typing the mail address and getting a route to reset and submit a new password.
I could not find a good tutorial for this purpose so I ask here.

You can make use of laravel authentication - reset password feature for that. The document is self-explanatory.

Related

How to implement Laravel Email verification for multi auth?

I follow what the documentation says and it works perfectly fine for single auth (in my case Patient Model). Now, i want to implement it on another user (Doctor). However, based on the documentation, laravel states that the routes responsible for email verification should be named exactly the same. So if i try to create a separate email verification, there would be conflicts on the name of the routes.
enter image description here
If youre using the bmatovu\multi-auth package, they have a seamless way that enables you to have multi auth and also leverage on email verification.
You can check out the wiki at https://github.com/mtvbrianking/multi-auth/wiki/Email-Verification
Cheers.

Laravel Passport Oauth Customize page / auto redirect

Hi I would like to ask about laravel passport oauth confirmation page
This is the page when we are asked for authorization, I would like to customize this page, or even possible to skip this page to always authorize anyway since the requestor will be just an internal application
I tried to google this but no luck. Is that possible? if so please tell me how to, or any link will be greatly appreciated
If you want to change the UI you can actually export the view and edit it
https://laravel.com/docs/5.5/passport#requesting-tokens
For the auto redirection, actually it can be done using laravel passport version ^7.30
Code:
https://github.com/laravel/passport/pull/1022
Documentation:
https://github.com/laravel/docs/pull/5226
But since I was using laravel version that dont support passport ^7.30, I need to create the override
reference:
https://github.com/laravel/passport/issues/243
What I did was, I copied this snippets
https://paste.laravel.io/6LN6q
Creating a new class extending the passport AuthorizationController and overriding the authorize function only

How can i change the custom email after the password reset link sent

After clicking on forgot password. and Send Password reset link, i need to change the email sent to the user. Where do i find this view?
if you are using laravel 5.3 or above
use setPasswordResetNotification($token) on your user model, and return your own notification how ever you want to design it. :) check here.
https://laravel.com/docs/5.4/passwords#password-customization
you can change this view on:
resources=>views=>auth=>emails=>password.blade.php
Good luck :)

Laravel send mail via Gmail fails - cannot connect to server

The server, Ubuntu 16.04, with Nginx webserver.
I am running 2 virtual hosts, both have Laravel apps running. One is Laravel 5.1, the other is 5.4.
I have the same contact us form under both Laravel instances. The sendmail function on the controller is the same for both (I know I need to refactor this functionality off of the controller :-) ) Both have the same config/mail.php settings. .env is the same on both, other than the username and password. Both gmail accounts have insecure applications enabled / allowed.
The one running under Laravel 5.1 works perfectly. The one under 5.4 gives a timeout error when trying to connect to gmail.
Any ideas on what the fix should be?
The solution appears to be related to the Gmail password. The client insisted on an easily remembered password. I changed to a more complex password, and everything worked.
I did read a post that said that Google does not like automated accesses with insecure passwords. Sorry, I cannot reference that post - can't find it again.
Apparently, the solution is to use a secure password. I merely added special characters to the client's desired password.
I hope this helps someone else.

How to reset passwords in Laravel 5?

I am working on a project using Laravel 5 and I am trying to figure out how to reset passwords. I know the migration for the password resets is already there but I remember there was a ReminderController in Laravel 4 which I could generate but I cannot find the same in Laravel 5.
I am sure that Laravel 5 ships with a password reset mechanism but I cannot exactly figure out where to send the request and the method which handles sending the emails?
I can find the views and the migration but can anyone help me find the controller method and route. If anyone can provide me with a tutorial, I could work with that too.
Laravel also includes an
Auth\PasswordController 
that contains the logic necessary to reset user passwords. We've even provided views to get you started! The views are located in the
resources/views/auth 
directory. You are free to modify these views as you wish to suit your own application's design.
Your user will receive an e-mail with a link that points to the 
getReset method
of the
PasswordController.
This method will render the password reset form and allow users to reset their passwords. After the password is reset, the user will automatically be logged into the application and redirected to /home. You can customize the post-reset redirect location by defining a redirectTo property on the PasswordController:
protected $redirectTo = '/dashboard';
Source

Resources