-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Question: Should we send password reset instructions to unconfirmed emails? #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm honestly not entirely sure what the best thing to do in this situation is. I think if you require it to be the previously confirmed email, you could get into the following situation:
In the other case, as it stands, if a user erroneously updates their email by accident, then can't get reset instructions if needed, as the emails are going to the invalid address. Additionally, these issues could be exacerbated or mitigated by confirmation windows and when devise cleans up unconfirmed_email (if at all). Would definitely love to get some additional feedback. |
@booleanbetrayal Thanks for working on this library! I think the situation you outlined is actually the correct / intended behavior. IMO,
In the example you outlined, I'd say the user should:
As for code changes, I think you could simply delete these lines of code. Lemme know if this makes sense, I'd be happy to make a PR. |
I think that sounds sane. If anyone wants to put in a PR and ensures tests still pass, I'll approve / merge it ASAP. Thanks for the catch and sanity check, guys! |
@booleanbetrayal Thanks for following up! Here's a PR: #288 |
LOL, @coryschires we both added PR's for this seconds apart (quick fix). I'll remove mine (#289) since the commits are identical. @booleanbetrayal: I couldn't find a good place to add a test for this, and I'm not convinced it's needed considering the fallback to devise. If all looks well, let's merge in #288. |
@nickL LOL! Damn, we're too eager! |
#288 is in ... thanks guys! |
Question: Should we send password reset instructions to unconfirmed emails?
Background:
It looks like in the event theres a
pending_reconfirmation?
for a record we send the password reset email to the unconfirmed email instead of the confirmed. Just noticed this and thought I'd ask before submitting a PR. Is this expected? Thoughts?The text was updated successfully, but these errors were encountered: