Page MenuHomePhabricator

[lib] implement `QRAuthContext`
ClosedPublic

Authored by kamil on Jun 17 2024, 3:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 1:47 PM
Unknown Object (File)
Sat, Oct 12, 12:01 PM
Unknown Object (File)
Sat, Oct 12, 12:01 PM
Unknown Object (File)
Sat, Oct 12, 12:01 PM
Unknown Object (File)
Sat, Oct 12, 12:01 PM
Unknown Object (File)
Sat, Oct 12, 12:01 PM
Unknown Object (File)
Sun, Oct 6, 4:58 PM
Unknown Object (File)
Sep 18 2024, 5:12 PM
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.Jun 17 2024, 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.Jun 17 2024, 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.