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
F2190659: D6086.id20399.diff
Thu, Jul 4, 12:08 PM
F2188906: D6086.id.diff
Thu, Jul 4, 9:45 AM
Unknown Object (File)
Wed, Jul 3, 8:22 AM
Unknown Object (File)
Wed, Jul 3, 3:00 AM
Unknown Object (File)
Tue, Jul 2, 7:43 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
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.