This PR addresses this issue https://github.com/eduqg/LifeToRemind/issues/5. Configuring Action Mailer options and setting up the UI so that users who want to reset their password have a way to do so.
Why
We need to be able to send password reset instructions to users when they forget their passwords.
Testing
[ ] Install the mailcatcher gem with the command gem install mailcatcher before executing the next steps (This PR also sets up the app so that emails sent in dev environment go to mailcatcher)
[ ] Start up mailcatcher by running mailcatcher command in your terminal
[ ] Go back to the app and Sign up with an email and a password and then sign out
[ ] Visit the Sign in page
[ ] Click on the "Forgot your password" link
[ ] Assert that the link takes you to a page where you are required to provide your email
[ ] Fill in your email details and submit the form
[ ] Go to the mailcatcher tab and assert that a new Password Reset email was sent
[ ] Click on the link in the email and assert that you are taken to the password reset page in the app
[ ] Set up a new password and submit the form
[ ] Assert that you are redirected to the home page of the app
[ ] Sign out and sign in again with the new password to verify that the new password has taken effect
Additional Information
The PR configures the smtp server to be gmail
For this feature to work in production we will need to create environment variable with gmail credentials, namely: GMAIL_DOMAIN, GMAIL_USERNAME, GMAIL_PASSWORD and HOST where host is the base url of the app.
What
This PR addresses this issue https://github.com/eduqg/LifeToRemind/issues/5. Configuring Action Mailer options and setting up the UI so that users who want to reset their password have a way to do so.
Why
We need to be able to send password reset instructions to users when they forget their passwords.
Testing
mailcatcher
gem with the commandgem install mailcatcher
before executing the next steps (This PR also sets up the app so that emails sent in dev environment go to mailcatcher)mailcatcher
command in your terminalAdditional Information
GMAIL_DOMAIN
,GMAIL_USERNAME
,GMAIL_PASSWORD
andHOST
where host is the base url of the app.