allenwq / devise-multi_email

✉️ Let devise support multiple emails (authenticatable, confirmable and validatable).
MIT License
77 stars 29 forks source link

Allow resetting password with any email #56

Open letiesperon opened 4 years ago

letiesperon commented 4 years ago

Currently, devise mailer sends the reset password instructions email to the resource email: https://github.com/heartcombo/devise/blob/29943a26e61d68198666c59e07457dba3c75f581/lib/devise/mailers/helpers.rb#L34

But with multiple emails, you might want to get the reset password instructions to the email you entered, regardless of whether it's your primary email or not, right? In that case the email to should be set to opts[:email] instead.

Should we override this method? Is that something we are interested in doing?

allenwq commented 4 years ago

This sounds pretty good, @letiesperon do you want to draft a PR on it?