Skip to content
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

Expose reset password and confirmation tokens #2464

Merged
merged 3 commits into from Jun 13, 2013

Conversation

sslotnick
Copy link
Contributor

Picked up from #2462

Currently there is no way to use custom mailers that include single use confirmation/password reset tokens generated by Devise. A developer might want to do this if the app should send different types of mail depending on the type or status of the user. For example, one reset password mail for a regular user, another for premium users.

@@ -106,6 +106,11 @@ def resend_confirmation_token
send_confirmation_instructions
end
end

def get_or_create_confirmation_token
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with ensure_confirmation_token! because that's the API we use in token authenticatable.

Also, we can change this line to use this new method. :)

@josevalim
Copy link
Contributor

Thanks for the pull request. I have added some comments and then it should be ready to merge!

@sslotnick
Copy link
Contributor Author

Thanks for the comments! The request has been updated with the changes.

josevalim pushed a commit that referenced this pull request Jun 13, 2013
Expose reset password and confirmation tokens
@josevalim josevalim merged commit 56a26bd into heartcombo:master Jun 13, 2013
@josevalim
Copy link
Contributor

❤️ 💚 💙 💛 💜

@sslotnick sslotnick deleted the expose_reset_confirm_tokens branch June 13, 2013 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants