[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
@@ -3,11 +3,18 @@ from dotenv import load_dotenv
|
||||
import urllib.parse
|
||||
|
||||
def generate_url():
|
||||
load_dotenv(dotenv_path="/home/node/clawd/.env")
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
import urllib.parse
|
||||
|
||||
client_id = os.getenv("SO_CLIENT_ID") or os.getenv("SO_SOD")
|
||||
redirect_uri = "https://devnet-tools.superoffice.com/openid/callback" # Das muss im Portal so registriert sein
|
||||
state = "12345"
|
||||
# Try current and parent dir
|
||||
load_dotenv()
|
||||
load_dotenv(dotenv_path="../.env")
|
||||
|
||||
client_id = os.getenv("SO_CLIENT_ID")
|
||||
# MUST match what is registered in the SuperOffice Developer Portal for this Client ID
|
||||
redirect_uri = os.getenv("SO_REDIRECT_URI", "http://localhost")
|
||||
state = "roboplanet_prod_init"
|
||||
|
||||
if not client_id:
|
||||
print("Fehler: Keine SO_CLIENT_ID in der .env gefunden!")
|
||||
@@ -17,19 +24,24 @@ def generate_url():
|
||||
"client_id": client_id,
|
||||
"redirect_uri": redirect_uri,
|
||||
"response_type": "code",
|
||||
"scope": "openid offline_access", # Wichtig für Refresh Token
|
||||
"scope": "openid", # Basic scope
|
||||
"state": state
|
||||
}
|
||||
|
||||
base_url = "https://sod.superoffice.com/login/common/oauth/authorize"
|
||||
# Use online.superoffice.com for Production
|
||||
base_url = "https://online.superoffice.com/login/common/oauth/authorize"
|
||||
auth_url = f"{base_url}?{urllib.parse.urlencode(params)}"
|
||||
|
||||
print("\nBitte öffne diese URL im Browser:")
|
||||
print("\n--- PRODUKTIV-AUTH-LINK ---")
|
||||
print(f"Mandant: {os.getenv('SO_CONTEXT_IDENTIFIER', 'Cust26720')}")
|
||||
print(f"Client ID: {client_id[:5]}...")
|
||||
print("-" * 60)
|
||||
print(auth_url)
|
||||
print("-" * 60)
|
||||
print("\nNach dem Login wirst du auf eine Seite weitergeleitet, die nicht lädt (localhost).")
|
||||
print("Kopiere die URL aus der Adresszeile und gib mir den Wert nach '?code='.")
|
||||
print("\n1. Öffne diesen Link im Browser.")
|
||||
print("2. Logge dich in deinen ECHTEN Mandanten ein (Cust26720).")
|
||||
print("3. Nach der Bestätigung kopiere die URL aus der Adresszeile.")
|
||||
print("4. Paste die URL hier in den Chat.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_url()
|
||||
|
||||
Reference in New Issue
Block a user