Page MenuHomePhabricator

[native] add callback to remove secondary device during QR auth
ClosedPublic

Authored by kamil on Thu, Dec 12, 11:26 AM.
Tags
None
Referenced Files
F3516104: D14151.id46552.diff
Sun, Dec 22, 12:15 PM
Unknown Object (File)
Fri, Dec 20, 4:00 PM
Unknown Object (File)
Thu, Dec 19, 8:36 PM
Unknown Object (File)
Wed, Dec 18, 3:49 PM
Unknown Object (File)
Wed, Dec 18, 10:22 AM
Unknown Object (File)
Mon, Dec 16, 5:19 PM
Subscribers
None

Details

Summary

ENG-9959.

According to this we want to be able to remove the device on a timeout.

Depends on D14150

Test Plan

Call this callback when QR auth flow is finished - devices is removed from device list, secondary device is visually logged out.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil added inline comments.
native/account/qr-auth/qr-auth-context-provider.js
249 ↗(On Diff #46386)

Actually, we should throw an error here

native/account/qr-auth/qr-auth-context-provider.js
60–62 ↗(On Diff #46386)

This is just in case to ignore messages when there is no ongoing QR auth, e.g., Secondary responded,d but we're already in the process of removing it and we communicated to the user that it is not responding.

kamil published this revision for review.Thu, Dec 12, 11:57 AM

Will defer to @tomek on this one – I think it's probably a better bet for him to gain the context on QRAuthContextProvider than for me

tomek added inline comments.
native/account/qr-auth/qr-auth-context-provider.js
97–101 ↗(On Diff #46386)

Wondering whether we should add some conditions here. We early return in a couple of scenarios, but are we sure that all the cases are handled? I guess it might be safer to wrap this with an if with appropriate conditions.

This revision is now accepted and ready to land.Fri, Dec 13, 6:26 AM
native/account/qr-auth/qr-auth-context-provider.js
97–101 ↗(On Diff #46386)

In if above we early-exist or any message different that SECONDARY_DEVICE_REGISTRATION_SUCCESS so this should be safe