Page MenuHomePhabricator

[native] update Secondary Device Auth flow to support SIWE users
ClosedPublic

Authored by kamil on Oct 31 2024, 8:13 AM.
Tags
None
Referenced Files
F3513646: D13847.id45674.diff
Sun, Dec 22, 1:01 AM
F3513645: D13847.id45514.diff
Sun, Dec 22, 1:01 AM
F3513630: D13847.id.diff
Sun, Dec 22, 1:01 AM
F3513623: D13847.diff
Sun, Dec 22, 1:01 AM
Unknown Object (File)
Mon, Dec 16, 8:46 AM
Unknown Object (File)
Wed, Dec 4, 10:02 PM
Unknown Object (File)
Mon, Dec 2, 6:31 PM
Unknown Object (File)
Sun, Dec 1, 1:17 PM
Subscribers

Details

Summary

ENG-6145.

ENG-9825

  1. Turn functions into a hook
  2. Update SecondaryDeviceQRCodeScanner to fetch credentials for both username/wallet users
  3. Clean some code

Depends on D13846

Test Plan

Tested in D13849

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.Oct 31 2024, 8:53 AM
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
native/backup/use-client-backup.js
41 ↗(On Diff #45514)

we can't use useGetBackupSecretForLoggedInUser because in this one case we need also message too

native/backup/use-get-backup-secret.js
12 ↗(On Diff #45514)

it's named like this, to make sure it won't be used e.g. during restore where we need different mechanism

varun requested changes to this revision.Nov 5 2024, 7:24 AM

left a question inline

native/backup/use-client-backup.js
45 ↗(On Diff #45514)

why doesn't this function just get the SIWE backup secrets internally? seems unnecessary to pass siweBackupSecrets between JS and C++

This revision now requires changes to proceed.Nov 5 2024, 7:24 AM
kamil requested review of this revision.Nov 5 2024, 7:40 AM
kamil added inline comments.
native/backup/use-client-backup.js
45 ↗(On Diff #45514)

good question - I have no idea, I don't remember the reasoning behind that decision (D11715)

This code is now used for testing purposes, I am going to remove this (createNewSIWEBackup) and re-write as part of Native changes for minimal version of backup project, I also noted this here.

I can do it as part of this stack but this change won't be really related to this stack (and removed anyway) - let me know what you think @varun

varun added inline comments.
native/backup/use-client-backup.js
45 ↗(On Diff #45514)

I think it's fine if you make this change later

This revision is now accepted and ready to land.Nov 5 2024, 8:17 AM