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
Unknown Object (File)
Mon, Dec 2, 6:31 PM
Unknown Object (File)
Sun, Dec 1, 1:17 PM
Unknown Object (File)
Sat, Nov 30, 10:38 AM
Unknown Object (File)
Wed, Nov 27, 8:22 AM
Unknown Object (File)
Tue, Nov 26, 5:08 AM
Unknown Object (File)
Thu, Nov 21, 7:54 AM
Unknown Object (File)
Thu, Nov 21, 6:59 AM
Unknown Object (File)
Thu, Nov 21, 6:42 AM
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.Tue, Nov 5, 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.Tue, Nov 5, 7:24 AM
kamil requested review of this revision.Tue, Nov 5, 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.Tue, Nov 5, 8:17 AM