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