Page MenuHomePhabricator

[web] Use `signedIdentityKeysBlobSelector` in `SIWELoginForm`
ClosedPublic

Authored by atul on Mar 12 2023, 2:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 2:26 AM
Unknown Object (File)
Sat, Nov 9, 2:26 AM
Unknown Object (File)
Sat, Nov 9, 2:26 AM
Unknown Object (File)
Sat, Nov 9, 2:26 AM
Unknown Object (File)
Sat, Nov 9, 1:43 AM
Unknown Object (File)
Sat, Nov 9, 12:42 AM
Unknown Object (File)
Tue, Nov 5, 10:12 PM
Unknown Object (File)
Tue, Nov 5, 10:12 PM
Subscribers
None

Details

Summary

Now that we have signedIdentityKeysBlobSelector, we can use it in TraditionalLoginForm (previous diff) and SIWELoginForm to simplify things.


Depends on D7047

Test Plan
  1. Try to "SIWE" from web.

Screenshot 2023-03-12 at 5.47.45 PM.png (2×2 px, 731 KB)

  1. Set breakpoint in siweAuthResponder and make sure signedIdentityKeysBlob comes through and is validated as expected.

9308e0.png (1×4 px, 1 MB)

  1. Check the cookies table to see if signed_identity_keys column is populated correctly.

1b82fd.png (534×2 px, 142 KB)

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul published this revision for review.Mar 12 2023, 2:14 PM

update after fix + rebase

ashoat added inline comments.
web/account/siwe-login-form.react.js
77–79

Should we get rid of this in favor of accessing the primary ed25519 key via signedIdentityKeysBlob?

This revision is now accepted and ready to land.Mar 13 2023, 11:53 AM
web/account/siwe-login-form.react.js
77–79

I think it makes sense to grab this from Redux directly. Instead of stringifying in signedIdentityKeysBlobSelector and then parseing the primaryIdentityPublicKeys out again.