issue: ENG-6126
We want to cross reference the user info from before the action was called with the current user info, to check if the same user is still logged in. Otherwise we could end up overriding a new users session with a recovery that was startd for the previous user.
Details
Tested on both platforms that normal logins and loguts work as expected
Tested on native that if a COOKIE_INVALIDATION_RESOLUTION_ATTEMPT login with a different user id is dispatched, then the action is disregarded
Diff Detail
- Repository
- rCOMM Comm
- Branch
- inka/client_version_unsupported
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
lib/actions/siwe-actions.js | ||
---|---|---|
83 | Why do we set it to null? | |
native/redux/redux-setup.js | ||
203–210 | What's the reason behind having preRequestUserState in one and preRequestUserInfo in another? Can we make this consistent? | |
203–210 | Are the old values the same as the new ones, or are we introducing a change in the logic here? |
lib/actions/siwe-actions.js | ||
---|---|---|
83 | Siwe auth is never a recovery, so we know the user was logged out | |
native/redux/redux-setup.js | ||
203–210 | This changes the logic, because this fixes it: | |
203–210 | PreRequestUserState includes +cookiesAndSessions: { +[keyserverID: string]: PreRequestUserKeyserverSessionInfo, }, which are needed for setNewSessionActionType. They are not needed for logInActionTypes, so we don't include them there. So I would rather leave this as is, and not make the login action unnecessarily large. |
This diff led to ENG-7706 because preRequestUserState was not correctly stripped from calls to keyserver