mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 00:39:35 +08:00
* fix: remove hardcoded default superuser password * fix: harden legacy superuser credential handling * fix: update superuser CI paths * [autofix.ci] apply automated fixes * fix: have images default auto_login to false have images default auto_login to false * fix: reject legacy superuser password * fix: align docker auth setup docs * docs: fix custom docker auth examples * docs: include auth env in docker upgrade examples --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
25 lines
600 B
Python
25 lines
600 B
Python
import os
|
|
|
|
import requests
|
|
|
|
base = os.environ.get("LANGFLOW_URL", "")
|
|
api_key = os.environ.get("LANGFLOW_API_KEY", "")
|
|
|
|
headers = {"Content-Type": "application/json", "x-api-key": api_key}
|
|
|
|
who = requests.get(f"{base}/api/v1/users/whoami", headers=headers, timeout=30)
|
|
who.raise_for_status()
|
|
user_id = who.json()["id"]
|
|
|
|
# Must differ from the current password.
|
|
payload = {"password": "DocsExampleResetPass2025!"}
|
|
|
|
response = requests.patch(
|
|
f"{base}/api/v1/users/{user_id}/reset-password",
|
|
headers=headers,
|
|
json=payload,
|
|
timeout=30,
|
|
)
|
|
response.raise_for_status()
|
|
print(response.text)
|