mconf-web
mconf-web copied to clipboard
Update devise to fix wrong confirmation page
Author Name: Leonardo Daronco (Leonardo Daronco) Original Redmine Issue: 1336, http://dev.mconf.org/redmine/issues/1336
There's an issue in devise (3.2.4) that makes the confirmation link sent to the user on registration to be invalid. See https://github.com/plataformatec/devise/issues/2976
Sequence of facts that generates the issue:
- A user registers and a new User is created;
- Devise generates a new confirmation token for this user;
- Devise sends an email to the user with the confirmation link;
- In an @after_create@, a bigbluebutton room is created for this user;
- This @after_creates@ triggers an update in the user model;
- Devise generates a new confirmation token for the user;
- When the user tries to access the link received by email, it will not work because the confirmation token for this user has changed.
It was fixed monkey-patching devise on Mconf-Web, see @lib/devise/overrides.rb@. But this should not be taken as the final solution. It might be fixed on devise in the future or a better solution should be found.