[PR #4783] [MERGED] PM-17568 - Authenticator Sync: Sometimes synced verification codes only display the TOTP Key, not Issuer/username #5208

Closed
opened 2025-11-26 23:55:35 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4783
Author: @phil-livefront
Created: 2/25/2025
Status: Merged
Merged: 2/27/2025
Merged by: @phil-livefront

Base: mainHead: phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username


📝 Commits (10+)

  • 66031be PM-17568 - update logic to make sure we always send a valid totp uri to the auth app
  • 9db8984 fix naming to be specific to username since that is what is being grabbed
  • 9cde562 update docs
  • 28e63f3 Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username
  • 96a13ab PR comments and add more docs
  • a8cf0b3 Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username
  • 5830bdd Support steam uri and some logic improvements
  • e457ac2 Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username
  • 221c89d Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username
  • c3cca83 update comments

📊 Changes

4 files changed (+257 additions, -9 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryImpl.kt (+9 -5)
app/src/main/java/com/x8bit/bitwarden/data/platform/repository/util/TotpUriSanitizer.kt (+75 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryTest.kt (+20 -4)
app/src/test/java/com/x8bit/bitwarden/data/platform/repository/util/TotpUriSanitizerTest.kt (+153 -0)

📄 Description

🎟️ Tracking

PM-17568

📔 Objective

  • Previously, the password manager wasn’t always sending a properly formatted TOTP URI to the authenticator app. As a result, the secret was being displayed in the UI instead of the expected issuer/username. This fix ensures that we consistently generate and send a valid TOTP URI, maintaining compatibility with our authenticator bridge SDK.
  • On iOS, additional data is sent for this scenario, and we plan to align the Android implementation accordingly. While that change will be introduced in a future update, this fix ensures that the issue is addressed as soon as the sync flag is enabled. The second phase of this fix will be implemented once the monorepo update is available.

📸 Screenshots

Before

before

After

after

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/4783 **Author:** [@phil-livefront](https://github.com/phil-livefront) **Created:** 2/25/2025 **Status:** ✅ Merged **Merged:** 2/27/2025 **Merged by:** [@phil-livefront](https://github.com/phil-livefront) **Base:** `main` ← **Head:** `phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username` --- ### 📝 Commits (10+) - [`66031be`](https://github.com/bitwarden/android/commit/66031bef4480c06d1bf90e5c1e65eb6ba8ac7dbc) PM-17568 - update logic to make sure we always send a valid totp uri to the auth app - [`9db8984`](https://github.com/bitwarden/android/commit/9db898454711e7380de0b23e1c3479c08648f520) fix naming to be specific to username since that is what is being grabbed - [`9cde562`](https://github.com/bitwarden/android/commit/9cde562441a409dde1c9448e6ef00abe4cc295db) update docs - [`28e63f3`](https://github.com/bitwarden/android/commit/28e63f319792be4c49aca106788c1f3b7dab05ed) Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username - [`96a13ab`](https://github.com/bitwarden/android/commit/96a13ab6c6c9f593ed563975f72e17e5b6711082) PR comments and add more docs - [`a8cf0b3`](https://github.com/bitwarden/android/commit/a8cf0b3f72f022f7ec478e7c670855ec97a6c886) Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username - [`5830bdd`](https://github.com/bitwarden/android/commit/5830bddd46a4fb7eba6683db25fda2663ddbedce) Support steam uri and some logic improvements - [`e457ac2`](https://github.com/bitwarden/android/commit/e457ac24192c89ee10ddc0c68e7672c69108a890) Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username - [`221c89d`](https://github.com/bitwarden/android/commit/221c89d4fbaf56c964c4678673ce9e651000a99c) Merge branch 'main' into phil/PM-17568-fix-sync-issue-showing-verification-codes-instead-of-issuer-and-username - [`c3cca83`](https://github.com/bitwarden/android/commit/c3cca8365e3a74d823f0429a016ce3129584a60e) update comments ### 📊 Changes **4 files changed** (+257 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryImpl.kt` (+9 -5) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/util/TotpUriSanitizer.kt` (+75 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/repository/AuthenticatorBridgeRepositoryTest.kt` (+20 -4) ➕ `app/src/test/java/com/x8bit/bitwarden/data/platform/repository/util/TotpUriSanitizerTest.kt` (+153 -0) </details> ### 📄 Description ## 🎟️ Tracking [PM-17568](https://bitwarden.atlassian.net/browse/PM-17568) ## 📔 Objective - Previously, the password manager wasn’t always sending a properly formatted TOTP URI to the authenticator app. As a result, the secret was being displayed in the UI instead of the expected issuer/username. This fix ensures that we consistently generate and send a valid TOTP URI, maintaining compatibility with our authenticator bridge SDK. - On iOS, additional data is sent for this scenario, and we plan to align the Android implementation accordingly. While that change will be introduced in a future update, this fix ensures that the issue is addressed as soon as the sync flag is enabled. The second phase of this fix will be implemented once the monorepo update is available. ## 📸 Screenshots ### Before ![before](https://github.com/user-attachments/assets/34e9330d-bf94-42de-88c3-ab512d7f9790) ### After ![after](https://github.com/user-attachments/assets/41c1e98c-d14c-4a75-90c3-da841d1cfc48) ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes [PM-17568]: https://bitwarden.atlassian.net/browse/PM-17568?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:55:35 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#5208