Skip to content

Conversation

@edif2008
Copy link
Member

@edif2008 edif2008 commented Nov 6, 2025

📋 Summary

This PR adjust the behavior of the SDK in the following scenario:
A program running the SDK initializes a new client that authenticates via the Desktop app. After the client is initialized, the Desktop app gets locked. User will be re-prompted to authorize the SDK. However, after the confirmation, any operation will now fail since the session no longer exists.

🤔 Thought process

Currently, the approach is to catch the new error thrown by the SDK in this scenario: DesktopSessionExpired. If received, the client will do the following:

  1. Initialize a new client.
  2. Replace the old one with the new one.
  3. Retry the operation.

We convert it into a class so that we can add functionality around invocation that requires overwriting the client id.
This will be needed when trying to reinitialize the client if the desktop app gets locked.
When the desktop session is expired when performing an invocation, we try to reinitialize the client and then retry the invocation.
@edif2008 edif2008 changed the base branch from main to sdks-for-desktop-integrations November 6, 2025 13:35
@edif2008 edif2008 requested a review from AndyTitu November 6, 2025 15:39
@edif2008 edif2008 force-pushed the eddy/reauth-sdk-when-app-locked branch from e2adbb9 to dde9add Compare November 6, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants