Page MenuHomePhabricator

[lib] Add preRequestUserState to identity login
ClosedPublic

Authored by inka on Mar 27 2024, 3:55 AM.
Tags
None
Referenced Files
F3399269: D11393.id38439.diff
Mon, Dec 2, 2:46 AM
F3398846: D11393.diff
Mon, Dec 2, 12:44 AM
Unknown Object (File)
Thu, Nov 28, 5:57 PM
Unknown Object (File)
Thu, Nov 14, 12:00 PM
Unknown Object (File)
Wed, Nov 13, 9:32 AM
Unknown Object (File)
Wed, Nov 13, 6:45 AM
Unknown Object (File)
Sun, Nov 3, 12:20 PM
Unknown Object (File)
Sat, Nov 2, 10:03 AM
Subscribers

Details

Summary

We need to know the preRequestUserState to be able to decide if the login is a recovery login

Test Plan

Checked in the reducer that the value is present

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Mar 27 2024, 4:10 AM
varun requested changes to this revision.Mar 27 2024, 9:00 AM
varun added inline comments.
lib/types/identity-service-types.js
159 ↗(On Diff #38352)

should this be optional and non-nullable? confused why flow doesn't complain that the other hooks that return Promise<IdentityAuthResult> like useIdentityPasswordRegister() aren't returning a preRequestUserState key

This revision now requires changes to proceed.Mar 27 2024, 9:00 AM
lib/actions/user-actions.js
547 ↗(On Diff #38352)
lib/types/identity-service-types.js
159 ↗(On Diff #38352)

sorry it should definitely be nullable, but still wondering if it should be optional as well. also still don't understand why flow doesn't complain

lib/types/identity-service-types.js
159 ↗(On Diff #38352)

I've also noticed that Flow gets this wrong sometimes

lib/types/identity-service-types.js
159 ↗(On Diff #38352)

Yes, you are right, it should be both optional and nullable

Make preRequestUserState optional

varun added inline comments.
lib/actions/user-actions.js
547 ↗(On Diff #38439)

think this can be simplified, right?

This revision is now accepted and ready to land.Mar 28 2024, 8:50 AM