EastsideDev
EastsideDev

Reputation: 6659

Devise error attempting to send password reset token

Rails 5.1
Devise 4.3.0

My environment settings:

  config.action_mailer.default_url_options = { :host => Rails.application.secrets.domain_name }
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default :charset => "utf-8"

  config.action_mailer.smtp_settings = {
      address: Rails.application.secrets.email_provider_smtp_server,
      port: Rails.application.secrets.email_provider_smtp_port,
      authentication: :plain,
      enable_starttls_auto: true,
      user_name: Rails.application.secrets.email_provider_username,
      password: Rails.application.secrets.email_provider_password
  }

When I try to use the password reset form to reset the password, I get the following error:

Completed 500 Internal Server Error in 738ms (ActiveRecord: 566.0ms)
Net::SMTPAuthenticationError (534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbvv

I checked the Google Apps credentials I'm using, and they work fine (by login into my gmail account from a browser). The log shows me that the email text (to, from, etc.) is generated properly, and then followed by the error.

I also did the following:

http://www.google.com/accounts/DisplayUnlockCaptcha

I am on linux Ubuntu server. Could there be any settings that I am missing on the server side?

Solution:

The issue was that I was not logged into the right account, when I loosened application login rules.

Upvotes: 2

Views: 123

Answers (1)

Tom Aranda
Tom Aranda

Reputation: 6036

You may need to tell Google to authorize less secure apps. You can see the latest instructions here.

Upvotes: 2

Related Questions