Page MenuHomePhabricator

[native] Modify `SIWEPanel` to hit `siwe_auth` endpoint once SIWE message is signed
ClosedPublic

Authored by atul on Dec 24 2022, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 2, 7:07 AM
Unknown Object (File)
Sat, Jun 29, 6:44 AM
Unknown Object (File)
Wed, Jun 26, 12:41 AM
Unknown Object (File)
Wed, Jun 26, 12:41 AM
Unknown Object (File)
Wed, Jun 26, 12:41 AM
Unknown Object (File)
Wed, Jun 26, 12:41 AM
Unknown Object (File)
Wed, Jun 26, 12:40 AM
Unknown Object (File)
Wed, Jun 26, 12:34 AM
Subscribers
None

Details

Summary

Modify SIWEPanel to hit the siwe_auth endpoint instead of the create_account endpoint once SIWE message is signed.

We also modify the SIWE_AUTH_SUCCESS payload to a boolean indicating whether the signed message is valid and login/registration can continue.

NOTE: For now we will return from siweAuthResponder BEFORE login/registration... login/registration will come later at which point the payload for SIWE_AUTH_SUCCESS will look like RegisterResponse | LogInResponse or something.

Depends on D6026

Test Plan

Able to hit the endpoint and verify that the request payload is as expected:
https://blob.sh/58459b.png

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Dec 24 2022, 8:12 PM
This revision is now accepted and ready to land.Dec 25 2022, 7:23 PM

rebase before addressing feedback

This revision was landed with ongoing or failed builds.Dec 27 2022, 12:40 AM
This revision was automatically updated to reflect the committed changes.