Member-only story

Getting Devise to send reset password link

Kevin Kim
2 min readAug 19, 2018

--

Step 1: Make a throwaway gmail account, and name it something like startup_abc_password_reset@gmail.com

Step 2: Go to https://myaccount.google.com/lesssecureapps while logged in as the throwaway burner gmail account, and allow it access from less secure apps with just the click of a toggle.

Step 3: Bundle up the gem ‘dotenv-rails’ in your Gemfile if you haven’t already.

# Gemfilegem 'dotenv-rails'

Then run bundle in the Terminal.

Step 4: Create a .env file at the root of your Rails app if you have not already done so. Make sure that your .gitigonre file includes .env

Step 5: In your .env file, enter in the following:

GMAIL_USERNAME = your_throw_away_gmail_account_without_quotes
GMAIL_PASSWORD = your_throw_away_gmail_password_without_quotes

Step 6: Under config/environments/development.rb paste in the following between the Rails.application.configure do block.

Rails.application.configure do ...config.action_mailer.smtp_settin…

--

--

Responses (3)