Link issues together to show that they're related or that one is blocking others.
Learn more.
Activity
Sort or filter
Newest first
Oldest first
Show all activity
Show comments only
Show history only
username-removed-257938Title changed from User account creation reset token sent by email resets immediately. to User account creation reset token sent by email expires immediately.
Title changed from User account creation reset token sent by email resets immediately. to User account creation reset token sent by email expires immediately.
I can also confirm this exact problem. Using GitLab CE 8.0.2.
I create new users in the Admin panel, and the email correctly sends. However, the confirmation link immediately goes to a "Your password reset token has expired" notification on the "Forgot Password" screen at the URL "[gitlab's external URL]/users/password/new?user_email=".
Doing a request for a new password/new password reset, but the initial "set your password" link in the very first email notification is not working correctly.
I checked the config/initializers/devise.rb file and the reset value is set to 2.days, so that's correct.
I looked into this. The root cause of this issue is that Devise clears the reset_password_token and reset_password_sent_at fields here. After creation of a new user, it looks like the e-mail and password has changed, and so Devise determines the reset password token is no longer necessary.
I tried working around the issue by generating the token after the save, but doing that prevents GitLab from including the reset token in the e-mail sent to the user.
Ideally, Devise would provide a way to disable the automatic clearing of the reset token for this use case. We may need to override the before_save call to do this now. Another workaround may be to restore the reset tokens after the save occurs.