Page MenuHomePhabricator

[web/native/lib] make `source` param required on log in
ClosedPublic

Authored by kamil on Sep 29 2022, 3:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 11:23 AM
Unknown Object (File)
Sat, Nov 30, 3:57 AM
Unknown Object (File)
Mon, Nov 25, 10:27 PM
Unknown Object (File)
Mon, Nov 25, 7:57 PM
Unknown Object (File)
Mon, Nov 25, 7:57 PM
Unknown Object (File)
Mon, Nov 25, 7:57 PM
Unknown Object (File)
Wed, Nov 20, 3:13 AM
Unknown Object (File)
Fri, Nov 8, 7:19 PM

Details

Summary

Make source param required while calling the server endpoint. (task)

Note: there are still some places where source is optional but it is used in a different context - for now we care only about making it required while connecting with the keyserver, but if it is signification can be refactored in the future to make source required in remaining places.

Test Plan
  1. Running flow check.
  2. Checking all callers of resolveInvalidatedCookie - it's called only by fetchNewCookieFromNativeCredentials and source was required there previously and everywhere fetchNewCookieFromNativeCredentials is called source is passed explicitly from loginActionSources.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil edited the test plan for this revision. (Show Details)
kamil added a reviewer: atul.
ashoat added inline comments.
lib/types/account-types.js
116 ↗(On Diff #17177)

source will need to be added here at some point

native/account/resolve-invalidated-cookie.js
16 ↗(On Diff #17177)

Can you amend the test plan to include checking all callers of resolveInvalidatedCookie and making sure they specify a non-falsey source?

This revision is now accepted and ready to land.Sep 29 2022, 7:29 AM
lib/types/account-types.js
116 ↗(On Diff #17177)
native/account/resolve-invalidated-cookie.js
16 ↗(On Diff #17177)

Done!