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
F3401598: D5259.id17294.diff
Mon, Dec 2, 12:56 PM
F3401588: D5259.id17177.diff
Mon, Dec 2, 12:54 PM
F3401122: D5259.diff
Mon, Dec 2, 10:36 AM
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

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
No Lint Coverage
Unit
No Test Coverage

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

source will need to be added here at some point

native/account/resolve-invalidated-cookie.js
16

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
native/account/resolve-invalidated-cookie.js
16

Done!