[lib] Log out when invalidating session with authoritative keyserver in useKeyserverRecoveryLogIn
Summary:
This was discussed in ENG-7133.
Note that on web, keyserver session aren't currently invalidated via useKeyserverRecoveryLogIn, as we aren't able to attempt recovery since it depends on having access to user credentials. This will no longer be the case following the identity service launch, since user credentials will no longer be necessary for attempting keyserver session recovery. As such, I'm not going to bother doing anything special for web, since it will be supported via this mechanism relatively soon.
Depends on D11264
Test Plan:
- I hacked legacy-recover-keyserver-session.js to use the wrong password so the session recovery would fail
- I started the iOS simulator and logged in using a test user
- I opened the Redux Dev Tools
- I deleted the test user's cookie from the MariaDB database: DELETE FROM cookies WHERE user = 6390578 AND platform = 'ios'
- I sent a message as the test user
- I confirmed that session recovery was triggered in the Redux dev tools
- I confirmed that after session recovery failed, the user was logged out in the UI
- Via Redux dev tools, I confirmed that after session recovery failed, LOG_OUT_STARTED and LOG_OUT_SUCCESS were dispatched
Reviewers: inka, tomek
Reviewed By: tomek
Differential Revision: https://phab.comm.dev/D11265