Skip to content

[PM-43240] fix: preserve custom authenticator refresh periods when editing - #7370

Open
mvanhorn wants to merge 1 commit into
bitwarden:mainfrom
mvanhorn:fix/7347-preserve-authenticator-custom-refresh-period
Open

[PM-43240] fix: preserve custom authenticator refresh periods when editing#7370
mvanhorn wants to merge 1 commit into
bitwarden:mainfrom
mvanhorn:fix/7347-preserve-authenticator-custom-refresh-period

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

Change EditItemData.refreshPeriod to hold integer seconds, and retain the initially loaded period separately in that same Parcelable model so the picker can still offer it after the user temporarily selects a preset. In EditItemViewModel, initialize both values from the entity's actual period, remove the fromSeconds(...) ?: THIRTY conversion, carry integer seconds through RefreshPeriodOptionClick and its handler, and save the selected value directly to AuthenticatorItemEntity.period. In EditItemScreen, update the callbacks and previews and build the picker from the existing preset seconds plus the original custom period, deduplicated and sorted, using the existing refresh_period_seconds plural resource for both labels and the selected value.

Authenticator 2026.8.0 can scan a working TOTP entry with a 45-second refresh period, but saving an edit to its name or username changes the period to 30 seconds and breaks the generated codes. The September 3 reporter follow-up confirms that the failure occurs after an ordinary metadata edit, making the data-loss behavior concrete despite the feature-oriented issue title. The maintainer initially redirected custom period entry to the feature forum, then reopened the issue for investigation after the bug was clarified. This plan addresses that confirmed defect and displays the imported custom period as a selectable value; a general-purpose manual period editor remains outside this contribution.

Fixes #7347

📔 Objective

Not applicable to this change.

📸 Screenshots

No user-visible surface changes in this PR, so there is nothing to show.

@mvanhorn
mvanhorn requested review from a team and david-livefront as code owners September 9, 2026 11:21
@bitwarden-bot

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-43240
Link: https://bitwarden.atlassian.net/browse/PM-43240

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title fix: preserve custom authenticator refresh periods when editing [PM-43240] fix: preserve custom authenticator refresh periods when editing Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BWA-271] Add custom refresh period

2 participants