-
Notifications
You must be signed in to change notification settings - Fork 666
Use system PIN prompt when possible on Android #6645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 ✅
BiometricManager.Authenticators.DEVICE_CREDENTIAL | ||
|
||
else -> | ||
- null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new part of the patch, in our case we do not specify what authenticators to use when we get values, but if we do not specify any it will prompt for class 2 when available, which will then fail to decode the keychain. This changes this so it defaults to BiometricManager.Authenticators.BIOMETRIC_STRONG or BiometricManager.Authenticators.DEVICE_CREDENTIAL
. This part of the patch could probably be upstreamed.
} | ||
} | ||
|
||
+ override fun canOverrideExistingModule(): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the patch was not needed.
storage: CipherStorage, | ||
promptInfo: BiometricPrompt.PromptInfo | ||
): ResultHandler { | ||
- return if (storage.isAuthSupported()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might actually not be needed, leftover from previous changes I will try to remove.
privateKey: decryptedPrivateKey, | ||
}); | ||
} | ||
if ((theKeyIsASeedPhrase || theKeyIsAPrivateKey) && secret?.includes('cipher')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was that this code assumed the seed or pkey were encrypted as a stringified JSON object like {"seedphrase": "<encrypted_data>"}
, but it is actually just the encrypted data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Passed 👍🏽
* PoC implementation of using system pin prompt * Cleanup * Better patch * Add comment * Restore IS_DEV check * Fix import * Test fix * Fix secrets decryption * Fix patch * Temp: update force to readonly * Add a comma --------- Co-authored-by: jinchung <jin.chung17@gmail.com>
Fixes APP-####
What changed (plus any additional context for devs)
Screen recordings / screenshots
What to test
Tests scenarios in the notion doc.