Fallback SSO OAuth mint to browser PKCE when Python TLS fails.

HTTP mint often dies on auth.x.ai (curl OpenSSL / SSLEOFError); reuse the
registration browser to set SSO, complete authorize+consent, and fetch tokens
so CPA export/push to cpa.nopj.cn can continue.
This commit is contained in:
chaos committed 2026-07-14 10:04:55 +08:00
1 parent 2e833f2af3
commit 8b399277e7
4 files changed
+443 -9

No files matched your search

+2
View File
@@ -16,6 +16,7 @@ from .oauth_code import (
OAuthCodeError,
SCOPE as CODE_SCOPE,
mint_from_sso,
mint_from_sso_browser,
normalize_sso_cookie,
sso_to_token,
)
@@ -26,6 +27,7 @@ __all__ = [
"mint_with_browser",
"shutdown_mint_browsers",
"mint_from_sso",
"mint_from_sso_browser",
"sso_to_token",
"normalize_sso_cookie",
"CLIENT_ID",