Page MenuHomePhabricator

[lib] implement `QRAuthContext`
ClosedPublic

Authored by kamil on Mon, Jun 17, 3:51 AM.
Tags
None
Referenced Files
F2121007: D12449.diff
Wed, Jun 26, 3:34 PM
Unknown Object (File)
Tue, Jun 25, 9:02 AM
Unknown Object (File)
Mon, Jun 24, 4:12 PM
Unknown Object (File)
Mon, Jun 24, 3:46 PM
Unknown Object (File)
Mon, Jun 24, 2:19 PM
Unknown Object (File)
Sun, Jun 23, 12:19 PM
Unknown Object (File)
Sun, Jun 23, 10:25 AM
Unknown Object (File)
Sun, Jun 23, 2:40 AM
Subscribers

Details

Summary

ENG-8385.

QR code login is not working right now. As described here (Point 3) and here the issue is occuring because of the fact that useQRAuth is unmounting before it can send SECONDARY_DEVICE_REGISTRATION_SUCCESS. This stack is refactoring the code to move logic to context (see here).

This wraps the platform-specific logic to a context. Usage later in the stack.

Depends on D12445

Test Plan

Tested later in the stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Mon, Jun 17, 4:35 AM
kamil added inline comments.
lib/components/qr-auth-provider.react.js
54 ↗(On Diff #41381)
58–104 ↗(On Diff #41381)

this is unified code from both web and native QRCodeScreen

ashoat added inline comments.
lib/components/qr-auth-provider.react.js
17 ↗(On Diff #41381)
  1. I think we need mixed instead of Error
  2. Can we be more specific in the naming here? It seems to only handle registration errors, not eg. QR code generation errors
74 ↗(On Diff #41381)

Nit: should we call this performLogIn instead of performRegistration? I'm slightly worried that the reader might think this does registration when it can only do login

This revision is now accepted and ready to land.Mon, Jun 17, 10:07 AM
bartek added inline comments.
lib/components/qr-auth-provider.react.js
18 ↗(On Diff #41381)

Up to you, IMO it's good to distinguish what kind of key we want here.

19–26 ↗(On Diff #41381)

Again, up to you.

This revision was automatically updated to reflect the committed changes.