Skip to content

[PM-31117] feat: Add SDK-managed PIN unlock - #2995

Draft
matt-livefront wants to merge 1 commit into
matt/PM-37877-km-state-bridgefrom
matt/PM-31117-sdk-managed-pin
Draft

[PM-31117] feat: Add SDK-managed PIN unlock#2995
matt-livefront wants to merge 1 commit into
matt/PM-37877-km-state-bridgefrom
matt/PM-31117-sdk-managed-pin

Conversation

@matt-livefront

@matt-livefront matt-livefront commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

🎟️ Tracking

PM-31117

📔 Objective

Adds support for using the SDK for PIN management.

  • Adds the pm-31059-sdk-pin-unlock feature flag and exposes the SDK's userCryptoManagement().pinSettings() client for SDK-managed PIN state.
  • With the flag ON, PIN unlock and validation route through the SDK-managed path (InitUserCryptoMethod.pinState, PinSettingsClient.validatePin) instead of the legacy envelope/key parameters the app previously read and passed in itself.
  • PIN enrollment (setPins) and removal now unconditionally dual-write to both the legacy iOS-managed state and the new SDK-managed state, so the flag can be toggled in either direction without leaving a stale or missing PIN unlock method.

@matt-livefront matt-livefront added ai-review Request a Claude code review t:feature labels Aug 26, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context labels Aug 26, 2026
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.33333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.61%. Comparing base (441ed2c) to head (7b83ec4).

Files with missing lines Patch % Lines
...m/Services/UserCryptoManagementClientService.swift 0.00% 3 Missing ⚠️
...nShared/Core/Platform/Services/ClientService.swift 66.66% 3 Missing ⚠️
...Shared/Core/Platform/Models/Enum/FeatureFlag.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           matt/PM-37877-km-state-bridge    #2995      +/-   ##
=================================================================
+ Coverage                          79.58%   79.61%   +0.02%     
=================================================================
  Files                               1170     1171       +1     
  Lines                              75325    75358      +33     
=================================================================
+ Hits                               59950    59993      +43     
+ Misses                             15375    15365      -10     

☔ View full report in Codecov by Harness.
📢 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
Copy Markdown
Contributor

Claude Code is reviewing this pull request...

If this comment does not update with results, check the Actions log.

@quexten quexten left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sweet! After we roll out and remove the feature flag, that should drop a fair bit of logic from mobile's codebase :)

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:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants