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)
Sun, Dec 22, 1:01 AM
Unknown Object (File)
Sun, Dec 22, 1:01 AM
Unknown Object (File)
Sun, Dec 22, 1:01 AM
Unknown Object (File)
Sun, Dec 22, 1:01 AM
Unknown Object (File)
Mon, Dec 16, 8:46 AM
Unknown Object (File)
Dec 4 2024, 10:02 PM
Unknown Object (File)
Dec 2 2024, 6:31 PM
Unknown Object (File)
Dec 1 2024, 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
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.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

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.Nov 5 2024, 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.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

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.Nov 5 2024, 8:17 AM