Page MenuHomePhabricator

[lib] Add `siweAuthActionTypes.success` check everywhere there's a `logInActionTypes.success` check
ClosedPublic

Authored by atul on Dec 29 2022, 1:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 4:17 PM
Unknown Object (File)
Fri, Nov 8, 4:17 PM
Unknown Object (File)
Fri, Nov 8, 4:17 PM
Unknown Object (File)
Fri, Nov 8, 3:49 PM
Unknown Object (File)
Fri, Nov 8, 3:48 PM
Unknown Object (File)
Mon, Nov 4, 11:25 PM
Unknown Object (File)
Mon, Nov 4, 6:34 AM
Unknown Object (File)
Wed, Oct 23, 3:23 AM
Subscribers
None

Details

Summary

We want to make sure that we're handling siweAuthActionTypes.success everywhere there's a logInActionTypes.success check to ensure we're matching the existing login behavior.


Depends on D6085

Test Plan

Will be tested implicitly by subsequent diffs. Won't land until login/registration working end to end.

Known issue: SIWE registration leads to client in correct state, subsequent SIWE login has missing threadInfos. Currently investing.

Diff Detail

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

Event Timeline

atul requested review of this revision.Dec 29 2022, 1:37 AM

Sounds reasonable. But now I'm wondering if introducing new action was a good idea. Maybe dispatching the old action (possibly with a new field e.g. type) might be easier? I don't think we should change it now, though.

This revision is now accepted and ready to land.Dec 29 2022, 4:27 AM
In D6086#182693, @tomek wrote:

Sounds reasonable. But now I'm wondering if introducing new action was a good idea. Maybe dispatching the old action (possibly with a new field e.g. type) might be easier? I don't think we should change it now, though.

My understanding is that there's usually a 1:1 relationship between endpoints and actions? There could definitely be "1 action to many endpoints" relationships in the codebase, but I didn't look too hard.

In D6086#183275, @atul wrote:
In D6086#182693, @tomek wrote:

Sounds reasonable. But now I'm wondering if introducing new action was a good idea. Maybe dispatching the old action (possibly with a new field e.g. type) might be easier? I don't think we should change it now, though.

My understanding is that there's usually a 1:1 relationship between endpoints and actions? There could definitely be "1 action to many endpoints" relationships in the codebase, but I didn't look too hard.

I think that there's nothing which stops introducing 1:N relationship, but it might make the code more fragile and less readable, so let's keep this solution.