HomePhabricator
Diffusion Comm 34ef9be92e3f

[keyserver/lib/web/native] Support external cameras scanning the QR code

Description

[keyserver/lib/web/native] Support external cameras scanning the QR code

Summary:
These are the changes to allow Comm to be opened from the external camera scanning one of the QR codes on either web or native. This flow only supports Comm being installed on the phone, and if it is, the QR code will open up the app and navigate to the barcode scanner where we can read the keys encoded in the QR code.

In this diff, I've not actually set any actual keys, but this is all hidden behind development so this won't get released to production. The idea is that down the line, we'll want to store a pair of two keys, so stringifying and encoding a JSON object into the URL that can later be parsed by the barcode scanner made the most sense.

Going to add @tomek as blocking since I tried to use the invite link work as inspiration for the best way to achieve this (especially in regards to link handling).

Addresses ENG-4648

Depends on D8912

Test Plan:

  1. Confirmed that the barcode scanner read the data encoded in the QR code correctly still
  2. Had Comm logged in on my phone, then scanned the QR code with the iOS camera and saw Comm open and navigate to the barcode scanner
  3. Had Comm logged out of my phone, then scanned the QR code with the iOS camera and saw Comm open. After logging in, it took me to the barcode scanner.

Reviewers: atul, ginsu, varun, tomek

Reviewed By: tomek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8934

Details

Provenance
rohanAuthored on Aug 28 2023, 8:45 AM
Reviewer
tomek
Differential Revision
D8934: [keyserver/lib/web/native] Support external cameras scanning the QR code
Parents
rCOMM03f8f3e2324a: [report-service] Implement DB item size checks
Branches
Unknown
Tags
Unknown