HomePhabricator
Diffusion Comm 3a63c9460ff0

[lib][native] Only reduce CSAT on setAccessTokenActionType

Description

[lib][native] Only reduce CSAT on setAccessTokenActionType

Summary:
issue: ENG-7428

during both identity registration and log in for both password and wallet users new comm services auth metadata are persisted in CommSecureStore and emitted to JS: https://github.com/CommE2E/comm/blob/master/native/identity-service/identity-service-context-provider.react.js#L329
and https://github.com/CommE2E/comm/blob/master/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp#L1532-L1537

So we just need to stop removing it with resetUserSpecificState, and stop setting it with all actions but setAccessTokenActionType

We want to keep doing this on web, where we don't have an emitter

Test Plan:

  1. Tested that on web CSAT is cleared on logout, and is present when user is logged in
  2. Tested that on logout CSAT is set to an empty string on native
  3. Tested that on login/register CSAT is set to a non empty string on native
  4. Tested that if setNewSessionActionType with cookieInvalidated is dispatched, then the user is logged out and the CSAT is cleared

Reviewers: michal, marcin, tomek, ashoat

Reviewed By: ashoat

Subscribers: varun, ashoat

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

Details

Provenance
inkaAuthored on Mar 27 2024, 4:54 AM
Reviewer
ashoat
Differential Revision
D11395: [lib][native] Only reduce CSAT on setAccessTokenActionType
Parents
rCOMM7ad3d18e3433: [native] Don't refetch nonce from identity after identity auth
Branches
Unknown
Tags
Unknown