cleaned up references to older functionality

This commit is contained in:
adamhaley
2025-08-20 15:30:23 -07:00
parent 5cfb0fd606
commit e0fcc56aff
5 changed files with 21 additions and 23 deletions
+4 -4
View File
@@ -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)
+6 -8
View File
@@ -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
</div>
<div class="auto-close-notice">
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.
</div>
</div>
@@ -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
</script>
</body>
</html>
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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:
+7 -7
View File
@@ -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