Skip to content

BWA-238: bug: Send additional cipher data for Authenticator Sync#6714

Merged
david-livefront merged 1 commit intomainfrom
BWA-238-authenticator-sync-migration
Mar 25, 2026
Merged

BWA-238: bug: Send additional cipher data for Authenticator Sync#6714
david-livefront merged 1 commit intomainfrom
BWA-238-authenticator-sync-migration

Conversation

@david-livefront
Copy link
Collaborator

@david-livefront david-livefront commented Mar 24, 2026

🎟️ Tracking

BWA-238

📔 Objective

This PR adds additional data to the Authenticator Sync payload in order to display information better and handle Steam TOTP codes.

There is additional logic to support backwards compatibility between the Password Manager and Authenticator in case a user updates one app but not the other. It should be pretty seamless overall.

📸 Screenshots

Before After

@david-livefront david-livefront requested a review from a team as a code owner March 24, 2026 21:32
@github-actions github-actions bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:bug Change Type - Bug labels Mar 24, 2026
@david-livefront david-livefront added the ai-review Request a Claude code review label Mar 24, 2026
@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 56.60377% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.67%. Comparing base (b4917ce) to head (de68f1a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...tor/repository/util/SharedAccountDataExtensions.kt 0.00% 12 Missing ⚠️
...warden/authenticatorbridge/util/EncryptionUtils.kt 67.85% 8 Missing and 1 partial ⚠️
...rm/repository/AuthenticatorBridgeRepositoryImpl.kt 84.61% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6714      +/-   ##
==========================================
+ Coverage   85.30%   85.67%   +0.37%     
==========================================
  Files         897      942      +45     
  Lines       59830    60332     +502     
  Branches     8504     8530      +26     
==========================================
+ Hits        51037    51689     +652     
+ Misses       5840     5671     -169     
- Partials     2953     2972      +19     
Flag Coverage Δ
app-data 17.92% <20.75%> (+0.41%) ⬆️
app-ui-auth-tools 20.90% <0.00%> (+0.10%) ⬆️
app-ui-platform 15.62% <0.00%> (+0.30%) ⬆️
app-ui-vault 26.83% <0.00%> (+0.06%) ⬆️
authenticator 6.54% <0.00%> (-0.02%) ⬇️
lib-core-network-bridge 4.26% <35.84%> (+0.03%) ⬆️
lib-data-ui 0.95% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2026

Logo
Checkmarx One – Scan Summary & Details795c5df9-caaa-4709-9265-cec1f947f52b

Great job! No new security vulnerabilities introduced in this pull request

@claude
Copy link
Contributor

claude bot commented Mar 24, 2026

Claude finished @david-livefront's task in 2m 14s —— View job


Code Review: PR #6714 — Send additional cipher data for Authenticator Sync

  • Gather context and read changed files
  • Analyze changes for correctness, security, and best practices
  • Post findings

Summary

Overall Assessment: ✅ APPROVE

This PR enriches the Authenticator Sync payload with additional cipher metadata (id, name, username, isFavorite) to improve display and support Steam TOTP codes. The backwards compatibility strategy is well-designed: the serialization layer maintains totpUris for older Authenticator versions while adding a nullable cipherData field, and the deserialization gracefully falls back to legacy URI mapping when cipherData is absent.

The previous finding regarding requireNotNull is outdated — the current code already uses the null-safe ?: return@let null approach.

No new findings. The change is clean with appropriate test coverage for the new data models and mapping logic.


@david-livefront david-livefront force-pushed the BWA-238-authenticator-sync-migration branch from 5696e7a to de68f1a Compare March 24, 2026 22:03
@andrebispo5
Copy link
Contributor

andrebispo5 commented Mar 25, 2026

🤔 Noticed that the countdown circles are not vertically aligned, is it supposed to be this way? seems odd.
edit: the purpose of the PR is not to fix this but maybe we can create a tech debt ticket to fix it later.

* @param email email associated with the account.
* @param environmentLabel environment associated with the account.
* @param totpUris list of totp URIs associated with the account.
* @param lastSyncTime the last time the account was synced by the main Bitwarden app.
Copy link
Contributor

@andrebispo5 andrebispo5 Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch👍

Copy link
Contributor

@andrebispo5 andrebispo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved ✅

♻️ Consider the creation of the tech debt ticket

@david-livefront
Copy link
Collaborator Author

🤔 Noticed that the countdown circles are not vertically aligned, is it supposed to be this way? seems odd. edit: the purpose of the PR is not to fix this but maybe we can create a tech debt ticket to fix it later.

I noticed that too. I'll speak to design and see if I can get that fixed next.

@david-livefront
Copy link
Collaborator Author

Thanks @andrebispo5

@david-livefront david-livefront added this pull request to the merge queue Mar 25, 2026
Merged via the queue into main with commit 41b7ca2 Mar 25, 2026
32 checks passed
@david-livefront david-livefront deleted the BWA-238-authenticator-sync-migration branch March 25, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants