Page MenuHomePhabricator

[lib][native] Stop persisting CSAT
ClosedPublic

Authored by inka on Wed, Apr 24, 7:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 11:20 AM
Unknown Object (File)
Thu, May 2, 4:40 AM
Unknown Object (File)
Wed, May 1, 7:12 PM
Unknown Object (File)
Mon, Apr 29, 9:30 AM
Unknown Object (File)
Sun, Apr 28, 7:37 PM
Unknown Object (File)
Sun, Apr 28, 10:37 AM
Unknown Object (File)
Sat, Apr 27, 9:03 AM
Unknown Object (File)
Wed, Apr 24, 2:39 PM
Subscribers

Details

Summary

issue: ENG-7901
We want to stop persisting the CSAT, because we want the secure store to be the source of truth.
One thing that was a problem is that IdentitySearchProvider calls getAuthMetadata in the callback returned by useGetIdentitySearchAuthMessage before the CSAT is fetched by AccessTokenHandler. So for a second, the token is null, and getAuthMetadata throws when token is null. So we will check whether commServicesAccessToken is set. It generally should be set if isLoggedIn, the only exception will be now right after app is opened.
We can't include checking if csat is set in isLoggedIn selector, becuase if it is false, then LogInHandler dispatches a LOG_OUT action.

Test Plan

Tested that the csat is not persisted, tested that no errors are thrown. Tested that the token appears after a short while

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable