PM-31118: feat: Add support for SDK pin unlock - #7289
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: REQUEST CHANGES This PR gates PIN unlock behind a new Code Review Details
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7289 +/- ##
=======================================
Coverage 86.35% 86.35%
=======================================
Files 893 893
Lines 65488 65496 +8
Branches 9861 9863 +2
=======================================
+ Hits 56550 56557 +7
Misses 5464 5464
- Partials 3474 3475 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a92f29b to
b764623
Compare
| if (featureFlagManager.getFeatureFlag(key = FlagKey.SdkPinUnlock)) { | ||
| this.unlockVaultForUser( | ||
| userId = userId, | ||
| initUserCryptoMethod = InitUserCryptoMethod.PinState(pin = pin), |
There was a problem hiding this comment.
With this new init method, the SDK will retrieve the pinProtectedUserKeyEnvelope using the SdkStateBridge.
andrebispo5
left a comment
There was a problem hiding this comment.
⛏️ 💭 A few of these tests call prepareStateForUnlocking() and then immediately null out the keys it just seeded. Could the helper take pinProtectedUserKey and pinProtectedUserKeyEnvelope params (defaulting to "mockKey-1") so each test just passes null for the one it wants missing? Would trim the setup blocks a bit and quiet the storePinProtectedUserKey deprecation warnings.
b764623 to
948beac
Compare
|
Thanks @andrebispo5 |
🎟️ Tracking
PM-31118
📔 Objective
This PR add support for SDK pin unlock.