Details
Throw an exception while logging in to the keyserver and check if a user gets logged out. At this point the action doesn't log out from identity (should be implemented as a part of https://linear.app/comm/issue/ENG-1075/have-clients-registerlogin-directly-with-identity-service-to-then-log) but in https://linear.app/comm/issue/ENG-6424/delete-state-on-identity-login-logout-delete-account we've decided it will be the same action which logs out from a keyserver.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/components/keyserver-connection-handler.js | ||
---|---|---|
147 ↗ | (On Diff #36163) | We shouldn't log out on every failed attempt. If we were able to successfully log in, then e.g. connection issue shouldn't log the user out. |
lib/components/keyserver-connection-handler.js | ||
---|---|---|
147 ↗ | (On Diff #36163) | This feels a bit messy, but not sure I can think of an obviously better solution. Separately, we should think about how to handle session invalidation with my keyserver. I suppose that too should cause a forced logout. I wonder if we should handle that forced logout here, in CallKeyserverEndpointProvider, callSingleKeyserverEndpoint, or somewhere else |
lib/components/keyserver-connection-handler.js | ||
---|---|---|
147 ↗ | (On Diff #36163) | I'm not sure if the forced logout is necessary.
|
lib/components/keyserver-connection-handler.js | ||
---|---|---|
147 ↗ | (On Diff #36163) | We certainly should not log out before attempting session recovery. But what happens if keyserverAuth fails during session recovery for my keyserver? There's a possibility that keyserverAuth fails due to network connectivity issues, even though the session invalidation was delivered across the network. But keyserverAuth can also fail due to a mismatch between the keys that the keyserver is using, and the keys that the client is getting from the identity service for that keyserver. I think that there's no need to log the user out due to network connectivity issues, but it might be a good idea to log them out if there is a key mismatch, since that likely indicates a persistent inability for the client to connect to my keyserver, which might result in broken functionality. Either way, this is a discussion for another diff. |
lib/components/keyserver-connection-handler.js | ||
---|---|---|
147 ↗ | (On Diff #36163) | Created a task to track https://linear.app/comm/issue/ENG-6679/handle-auth-failure-during-session-recovery |