[PR #3609] PM-9532: pt2. separate vault unlock logic and fail out on error during login. #4279

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

Original Pull Request: https://github.com/bitwarden/android/pull/3609

State: closed
Merged: Yes


🎟️ Tracking

PM-9532

📔 Objective

If a user is able to authenticate successfully with the server but there is an issue in the SDK when unlocking the vault (or related SDK operation like initializing crypto) they will be in a sort of limbo state where they will immediately be take to the unlock screen but unable to proceed. To prevent this and match iOS behavior we want to propagate any error from the SDK that occurs in the vault unlock process to the LoginResult and prevent a "successful" login, if they are unable to access the vault due to the issue stated above.

NOTE

The repro step which originally highlighted this issue has been fixed in the SDK according to the info on the ticket. To recreate you can force the result of VaultSdkSourceImpl.initializeCrypto to return a failure and see the difference on main vs this branch. Also testing to make sure no regression is added in the separation of some of the vault unlock logic from the storage of keys.

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
**Original Pull Request:** https://github.com/bitwarden/android/pull/3609 **State:** closed **Merged:** Yes --- ## 🎟️ Tracking [PM-9532](https://bitwarden.atlassian.net/browse/PM-9532) <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective If a user is able to authenticate successfully with the server but there is an issue in the SDK when unlocking the vault (or related SDK operation like initializing crypto) they will be in a sort of limbo state where they will immediately be take to the unlock screen but unable to proceed. To prevent this and match iOS behavior we want to propagate any error from the SDK that occurs in the vault unlock process to the `LoginResult` and prevent a "successful" login, if they are unable to access the vault due to the issue stated above. <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> ## NOTE The repro step which originally highlighted this issue has been fixed in the SDK according to the info on the ticket. To recreate you can force the result of `VaultSdkSourceImpl.initializeCrypto` to return a failure and see the difference on `main` vs this branch. Also testing to make sure no regression is added in the separation of some of the vault unlock logic from the storage of keys. <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> ## ⏰ 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-9532]: https://bitwarden.atlassian.net/browse/PM-9532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
GiteaMirror added the pull-request label 2025-11-26 23:42:20 -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#4279