This commit is contained in:
tv0924@icloud.com 2025-06-22 22:19:30 +09:00
commit 495b3a52da
5 changed files with 161 additions and 30 deletions

View file

@ -0,0 +1,13 @@
import csv
import os
def save_oauth_providers(url, oauth_entries):
csv_file = "./oauth_providers.csv"
file_exists = os.path.isfile(csv_file)
with open(csv_file, "a", newline="", encoding="utf-8") as f:
writer = csv.writer(f)
if not file_exists:
writer.writerow(["issuer", "provider", "oauth_uri"])
for entry in oauth_entries:
writer.writerow([url, entry.provider or None, entry.oauth_uri or None])
print(f"✅ OAuth providers saved to {csv_file}\n")