Page MenuHomePhabricator

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

Authored by kamil on Thu, Oct 31, 8:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 9:14 AM
Unknown Object (File)
Fri, Nov 15, 8:47 PM
Unknown Object (File)
Fri, Nov 15, 1:41 AM
Unknown Object (File)
Mon, Nov 11, 12:04 AM
Unknown Object (File)
Sun, Nov 10, 11:17 AM
Unknown Object (File)
Sun, Nov 10, 1:21 AM
Unknown Object (File)
Thu, Nov 7, 6:39 AM
Unknown Object (File)
Wed, Nov 6, 2:22 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
Branch
backup-work-5
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Thu, Oct 31, 8:53 AM
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
native/backup/use-client-backup.js
41

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

native/backup/use-get-backup-secret.js
12

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

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

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

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