Page MenuHomePhabricator

[keyserver] Fix `siweAuthResponder` login issue
ClosedPublic

Authored by atul on Dec 29 2022, 5:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 10:06 AM
Unknown Object (File)
Sat, Nov 30, 6:56 AM
Unknown Object (File)
Sat, Nov 30, 6:56 AM
Unknown Object (File)
Sat, Nov 30, 6:56 AM
Unknown Object (File)
Fri, Nov 22, 4:53 AM
Unknown Object (File)
Fri, Nov 22, 4:53 AM
Unknown Object (File)
Fri, Nov 22, 4:53 AM
Unknown Object (File)
Fri, Nov 22, 4:52 AM
Subscribers
None

Details

Summary

So after setting some breakpoints within processSuccessfulLogin, fetchThreadInfos, fetchServerThreadInfos, and rawThreadInfosFromServerThreadInfos found the issue.

Pretty dumb mistake on my part when implementing fetchUserIDForEthereumAddress(...). The return value should be (and is typed as) ?string... but was actually returning ?number which broke some of the comparison checks in rawThreadInfosFromServerThreadInfos. Adding the .toString() at the end fixes things up and now registration and login work fully as expected.

Test Plan
  1. Able to successfully register via SIWE
  2. Able to successfully log in via SIWE

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable