Page MenuHomePhabricator

[lib] Mark ks as temporary if version or verify_invite_link were called
AbandonedPublic

Authored by inka on Dec 29 2023, 6:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 5:54 AM
Unknown Object (File)
Thu, Oct 31, 12:51 AM
Unknown Object (File)
Oct 17 2024, 3:27 PM
Unknown Object (File)
Oct 16 2024, 2:09 AM
Unknown Object (File)
Oct 16 2024, 2:09 AM
Unknown Object (File)
Oct 16 2024, 2:09 AM
Unknown Object (File)
Sep 22 2024, 5:14 PM
Unknown Object (File)
Sep 22 2024, 4:26 AM
Subscribers

Details

Reviewers
ginsu
michal
kamil
Summary

issue: ENG-6302
If the clients calls an endpoint without authenticating with the keyserver first, they want to temporarily add the keyserver to the store, but not persist it

If VERSION or VERIFY_INVITE_LINK endpoints were called, we should somehow mark the keyserver as “temporarily” connected - keyserverConnectionHandler will not be attempting to log the user in to that keyserver, and this keyserver will not be persisted.

  1. It might be useful to use the same cookie that we got from the keyserver, in the next request
  2. But calling those endpoints doesn’t necessarily mean that the user wants to permanently connect (login) to this keyserver. The user might for example resign from accepting an invite link.

Note that if the keyserver was already in the store it won't be marked as temporary.

Test Plan

Tested that when getVersion endpoint is hit, the keyserver is added with connectionIssue: 'temporarily_connected'.

Diff Detail

Repository
rCOMM Comm
Branch
inka/set_new_session
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

If we don't have the keyserver in the redux store, we are not using the socket to connect to it. So this call site - after using fetch is the only place from which we dispatch setNewSessionActionType (hidden in setNewSession) which can be called for a keyserver we don't have in the store

inka requested review of this revision.Dec 29 2023, 6:30 AM

This feels pretty hacky. Can we instead set a parameter at the callsite that determines if the sessionChange should be marked as temporary?