HomePhabricator
Diffusion Comm 35764971478c

[lib][native] Stop persisting CSAT

Description

[lib][native] Stop persisting CSAT

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

Reviewers: will, varun, atul, tomek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11759

Details

Provenance
inkaAuthored on Wed, Apr 24, 7:00 AM
Reviewer
tomek
Differential Revision
D11759: [lib][native] Stop persisting CSAT
Parents
rCOMMa05e97f0976b: [lib][native] Move reduceServicesAccessToken and setAccessTokenActionType to…
Branches
Unknown
Tags
Unknown