Merge ~roadmr/canonical-identity-provider:2fa-always-generate-paper-backup into canonical-identity-provider:master
Status: | Merged |
---|---|
Approved by: | Daniel Manrique |
Approved revision: | 8c0ea6cb0e9e83819cdcc13d6ecd5c7eac16ed37 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~roadmr/canonical-identity-provider:2fa-always-generate-paper-backup |
Merge into: | canonical-identity-provider:master |
Diff against target: |
218 lines (+129/-10) 4 files modified
src/webui/templates/device/new-paper-device-confirmation.html (+6/-0) src/webui/templates/device/print-codes.html (+2/-0) src/webui/tests/test_views_devices.py (+87/-7) src/webui/views/devices.py (+34/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Hasan Ammar (community) | Approve | ||
Review via email: mp+383650@code.launchpad.net |
Commit message
Automatically generate and show a paper backup device when a non-paper device is added and no backup device existed.
This is controllable with a feature flag.
Description of the change
As discussed with design team, this has an "ugly view" that should be tweaked before going to production. Feature flag can be enabled on staging for testing, or the feature can be tested locally as well.
QA tips:
- Enable flag in staging
- Add a device on an account with no paper backup devices (e.g. delete your backup first or create a new account).
- After verifying your new device you will be inconditionally shown a set of just-generated backup codes with a prompt to print or store them.
Possibly pending things:
- We're adding two devices so two flash messages are shown, this could be consolidated into one if the current behavior is ugly.
- Ugly view can be invoked separately on any existing paper device (aids with easier QA) like so:
https:/
Code looks good. Tested locally and works as expected.