Page MenuHomePhabricator

[lib][native] Stop persisting CSAT
ClosedPublic

Authored by inka on Apr 24 2024, 7:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 2:28 AM
Unknown Object (File)
Fri, Nov 1, 7:53 PM
Unknown Object (File)
Fri, Nov 1, 7:53 PM
Unknown Object (File)
Fri, Nov 1, 7:53 PM
Unknown Object (File)
Fri, Nov 1, 7:34 PM
Unknown Object (File)
Oct 11 2024, 3:50 PM
Unknown Object (File)
Oct 11 2024, 3:50 PM
Unknown Object (File)
Oct 11 2024, 3:50 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