I'm new to Devise.
I want that when a user clicks on forgot password link, he should get an email with an auto generated password which a user can use for login in my app, or even get both the auto generated password and a token to reset the password.
I have looked at Devise's passwords controller but wasn't sure what to do.
# GET /resource/password/edit?reset_password_token=abcdef
def edit
self.resource = resource_class.new
set_minimum_password_length
resource.reset_password_token = params[:reset_password_token]
end
I have also looked at this code below but still am failing on how I can implement it.
def send_reset_password_instructions
token = set_reset_password_token
send_reset_password_instructions_notification(token)
token
end