diff --git a/dropbox_auth_manager.py b/dropbox_auth_manager.py index 8b2d204..e8151aa 100644 --- a/dropbox_auth_manager.py +++ b/dropbox_auth_manager.py @@ -128,10 +128,10 @@ class DropboxAuthManager: print(f"[DropboxAuthManager] Response status: {response.status_code}") print(f"[DropboxAuthManager] Response text: {response.text}") - # If we get a 400 error and we're using a redirect_uri, try without it - # This handles cases where the auth code was obtained without the redirect_uri + # If we get a 400 error and we're using a callback URL, try without it + # This handles cases where the auth code was obtained without a callback URL if response.status_code == 400 and redirect_uri: - print(f"[DropboxAuthManager] 400 error with redirect_uri, trying without redirect_uri...") + print(f"[DropboxAuthManager] 400 error with callback URL, trying without callback URL...") data_without_redirect = { "code": auth_code, @@ -140,7 +140,7 @@ class DropboxAuthManager: "client_secret": self.app_secret } - print(f"[DropboxAuthManager] Retry request data (no redirect_uri): {data_without_redirect}") + print(f"[DropboxAuthManager] Retry request data (no callback URL): {data_without_redirect}") response = requests.post("https://api.dropbox.com/oauth2/token", headers=headers, data=data_without_redirect) diff --git a/oauth_handler.py b/oauth_handler.py index e75fc07..5027e1e 100644 --- a/oauth_handler.py +++ b/oauth_handler.py @@ -43,7 +43,7 @@ class OAuthCallbackHandler: try: print(f"[OAuthHandler] Processing callback for session: {self.session_id}") print(f"[OAuthHandler] Auth code received: {auth_code[:10]}...") - print(f"[OAuthHandler] Redirect URI: {redirect_uri}") + print(f"[OAuthHandler] Processing callback for auth code exchange") # Use DropboxAuthManager to exchange the code print(f"[OAuthHandler] Creating DropboxAuthManager for token exchange...") @@ -136,7 +136,7 @@ These credentials are ready to use immediately. except Exception as e: print(f"[OAuthHandler] Warning: Could not send WebSocket notification: {e}") else: - print(f"[OAuthHandler] Skipping WebSocket notification for display_only method - no auto-refresh") + print(f"[OAuthHandler] Skipping WebSocket notification for display_only method") # Call completion callback if provided if self.completion_callback: @@ -330,7 +330,7 @@ def create_display_only_success_page(session_id, app_key, app_secret, refresh_to
- Copy the credentials above, then manually refresh ComfyUI to hide the auth fields. Close this window when done. + Copy the credentials above, then close this window when done.
@@ -365,12 +365,10 @@ def create_display_only_success_page(session_id, app_key, app_secret, refresh_to }}); }}); - // For display_only, don't auto-refresh ComfyUI - let user copy credentials first - // The user can manually refresh when they're done - console.log('Display-only OAuth completed - not auto-refreshing ComfyUI'); + // For display_only, let user copy credentials first + console.log('Display-only OAuth completed - credentials ready for copying'); - // Don't auto-close for display_only - let user close manually after copying credentials - // The user can close this window when they're done copying + // User can close this window when done copying credentials diff --git a/setup_dropbox_node.py b/setup_dropbox_node.py index 6972f7f..90ceb75 100644 --- a/setup_dropbox_node.py +++ b/setup_dropbox_node.py @@ -178,8 +178,8 @@ class DropboxSetupNode: auth_manager_setup = DropboxAuthManager(app_key_clean, app_secret_clean) # Get the tokens without storing them yet - # Use manual OAuth flow without redirect_uri (auth codes from manual flow) - print(f"[DropboxSetup] Using manual OAuth flow without redirect_uri") + # Use manual OAuth flow (auth codes from manual copy/paste) + print(f"[DropboxSetup] Using manual OAuth flow") result = auth_manager_setup.exchange_auth_code_raw(auth_code_clean) refresh_token = result.get("refresh_token") @@ -249,7 +249,7 @@ These credentials are ready to use immediately. print("="*80) print("Copy the lines above to your environment variables!") print("Perfect for RunPod, Docker, and production environments!") - print("Note: ComfyUI won't auto-refresh - refresh manually after copying!") + print("Note: Refresh ComfyUI manually after copying credentials!") print("="*80 + "\n") # Use ComfyUI's dynamic return format for better UI integration diff --git a/test_dropbox_auth.py b/test_dropbox_auth.py index 7f8a9a1..228a510 100644 --- a/test_dropbox_auth.py +++ b/test_dropbox_auth.py @@ -78,7 +78,7 @@ def test_auth_code_exchange(): auth.exchange_auth_code(test_auth_code) print("✅ Auth code exchange successful") - print("✅ Credentials stored in keyring") + print("✅ Credentials stored successfully") return True except Exception as e: diff --git a/web/dropbox_oauth.js b/web/dropbox_oauth.js index 600b2d8..bc2972f 100644 --- a/web/dropbox_oauth.js +++ b/web/dropbox_oauth.js @@ -18,7 +18,7 @@ app.registerExtension({ const data = event.detail; if (data.success) { - console.log("[DropSendNode] OAuth successful - refreshing interface"); + console.log("[DropSendNode] OAuth successful"); this.handleOAuthSuccess(); } else { console.error("[DropSendNode] OAuth failed:", data.message); @@ -31,7 +31,7 @@ app.registerExtension({ const data = event.detail; if (data.success) { - console.log("[DropSendNode] Reconnect successful - refreshing interface"); + console.log("[DropSendNode] Reconnect successful"); this.handleReconnectSuccess(); } }); @@ -42,7 +42,7 @@ app.registerExtension({ console.log("[DropSendNode] Received OAuth completion notification via postMessage", event.data); if (event.data.success) { - console.log("[DropSendNode] OAuth successful - refreshing interface"); + console.log("[DropSendNode] OAuth successful"); this.handleOAuthSuccess(); } else { console.error("[DropSendNode] OAuth failed:", event.data.message); @@ -58,8 +58,8 @@ app.registerExtension({ // Reset any reconnect checkboxes this.resetReconnectFields(); - // Note: No auto-refresh - user can manually refresh ComfyUI when ready - console.log("[DropSendNode] OAuth success handled - no auto-refresh, user can manually refresh ComfyUI"); + // Note: Manual refresh required if user wants to update UI + console.log("[DropSendNode] OAuth success handled - manual refresh available"); }, resetReconnectFields() { @@ -84,8 +84,8 @@ app.registerExtension({ }, handleReconnectSuccess() { - // Note: No auto-refresh - user can manually refresh ComfyUI to see auth fields - console.log("[DropSendNode] Reconnect success handled - no auto-refresh, user can manually refresh ComfyUI"); + // Note: Manual refresh required to see auth fields + console.log("[DropSendNode] Reconnect success handled - manual refresh available"); }, // Override node execution to detect and handle OAuth URLs