As things stand we sometimes discard cookies unnecessarily, e.g.
connecting to another server (new session added), possibly done by another consumer of the authprovider, e.g. LS extension
logging out a session we didn't log in with
logging out our session X but not our session Y
We need to keep track of sessions we use (and get cookies for). Then in our vscode.authentication.onDidChangeSessions handler, check silently for any of our sessions which no longer exist, then drop their cookies only.
https://github.com/intersystems-community/intersystems-servermanager/blob/439862c58e576b3cba5891d32fca3c2c815e7866/src/extension.ts#L66-L74
As things stand we sometimes discard cookies unnecessarily, e.g.
We need to keep track of sessions we use (and get cookies for). Then in our vscode.authentication.onDidChangeSessions handler, check silently for any of our sessions which no longer exist, then drop their cookies only.