Reputation: 588
I am new to rails and i'm using a rails devise template application. When i enter my email and try reset my password, i get the following error: authentication required
What does this mean?
UPDATE: As suggested by trh, the error is coming from secrets.yml
Here is what it currently looks like:
development:
admin_name: Ben
admin_email: [email protected]
admin_password: password
email_provider_username: "[email protected]" #eg. [email protected]
email_provider_password: "password"
domain_name: example.com
secret_key_base: #30 digit code
Is it possible that the error comes from the way i have declared the email provider username and password? does it need to be in the form <%= ENV["GMAIL_USERNAME"] %>
?
Upvotes: 0
Views: 373
Reputation: 7339
You mail config is done in: config/environments/development.rb
Since the RailsApps template already has that set up for gmail, you need to change the data (username, passsword, etc) in config/secrets.yml
. If you plan to use SMTP instead (for a non-google address) then you'll need to change your development.rb file to match that. For instance you'll have to change the domain host, so if your mail provider is outlook.com you're config will look something like:
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.live.com",
:port => 587,
:enable_starttls_auto => true,
:user_name => '[email protected]',
:password => 'password',
:domain => 'example.com',
:authentication => 'plain'
}
Upvotes: 1