5.x devise-two-factor upgrade phase 1 #2501
Merged
+147
−49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Post-release
Run:
rails runner db/data/20250117151047_regenerate_otp_secrets.rb
on each environment in turn.User#legacy_otp_secret
will cover the period that "new" otp_secrets are NULL.Phase 2 Cleanup release
We can remove the old DB columns and
legacy_otp_secret
in a separate release:https://github.com/devise-two-factor/devise-two-factor/blob/main/UPGRADING.md#phase-2-clean-up
In our case we won't need to copy otp_secret; because we're SMS-only we're able to do that in the Phase 1 release data
migration.
NOTES:
schema.rb
since the upgrade, some bits likeprecision
go away with theRails 7.0 upgrade
Changes in this PR
Screenshots of UI changes
Before
After
Next steps
See the Plan checklist on https://trello.com/c/sXsThu5A/3099-upgrade-devise-two-factor-gem-from-4x-to-5x
CHANGELOG.md
, unless this PR is a small tweak which has no impact outside the development team.