Skip to content

Encrypt device info on auth flows #2948

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

Merged
merged 7 commits into from
Mar 10, 2023

Conversation

cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Mar 10, 2023

Task/Issue URL: https://app.asana.com/0/1201493110486074/1203835825731590/f

Description

Encrypts device info (name and type) on all auth flows.
Also changes QR format to follow b64 encoding

Steps to test this PR

(you will need 2 devices to test some of the auth flows)

create account and login

  • install app on device A and device B
  • device A(unauthenticated): go to settings -> sync -> create account
  • device A(authenticated): show QR code
  • device B(unauthenticated): go to settings -> sync
  • device B: read QR code
  • device B: scan QR code from device A
  • device B(authenticated): ensure login success

connect (device B should have a camera)

  • install app on device A and device B (both need to be unauthenticated, go to settings -> sync -> reset button)
  • device A(unauthenticated): go to settings -> sync
  • device A: click on "connect (show QR)" (it will start polling data)
  • device B(unauthenticated, with camera!): go to settings -> sync
  • device B: click on "connect (read QR)"
  • device B: scan QR code from device A
  • device B(authenticated): ensure an account is created (account data will appear at the top)
  • device A: ensure it joins the same account (can take 7 seconds) (account data will appear at the top)

@cmonfortep
Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@cmonfortep cmonfortep marked this pull request as ready for review March 10, 2023 12:00
}
}

private fun login(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was duplicated (probably from a previous merge)

@CDRussell CDRussell self-assigned this Mar 10, 2023

data class DeviceType(val deviceFactor: String = "") {
fun type(): Type {
val mobileRegex = Regex("(phone|tablet)", RegexOption.IGNORE_CASE)
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe move outside of this function for reuse

@cmonfortep cmonfortep merged commit eb5b05e into develop Mar 10, 2023
@cmonfortep cmonfortep deleted the feature/cristian/sync/update_devicename_encrypt branch March 10, 2023 13:52
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