Skip to content
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

Use AndroidKeyStore to encrypt tokens. #125

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Conversation

LossyDragon
Copy link
Collaborator

  • Add: Crypto class that implements the AndroidKeyStore with an encrypt and decrypt functions.
  • Add: CryptoTest class as an instrumentation test, making sure the implementation works.
  • Add: Two new preferences to contain the encrypted tokens
  • Change: Convert the old preferences to the new encrypted ones. Then clears them out.
  • Change: 'remember me' to 'remember session'.
  • Remove: password preference as we shouldn't need it (and it was always blank with my testing with 2FA and non-2FA).

Note: Having the alias in the repo shouldnt be an issue after researching. It only acts as a memory pointer for AKS. The keystore is all handled by the operating system.
Here is a good consice explanation for this: https://stackoverflow.com/a/49431434/13225929

Hopefully the build passes, as we have an instrumated test class.

@oxters168
Copy link
Owner

Great work!

@oxters168 oxters168 merged commit 5ab1a43 into master Feb 7, 2025
1 check passed
@LossyDragon LossyDragon deleted the encrypted-datastore branch February 9, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants