diff --git a/whois/settings.py b/whois/settings.py index 2b92694..a2dce34 100644 --- a/whois/settings.py +++ b/whois/settings.py @@ -33,11 +33,9 @@ oidc_enabled = True # OAuth settings +SSO_PROVIDER = os.environ.get("OAUTH_PROVIDER") SSO_CLIENT_ID = os.environ.get("OAUTH_CLIENT_ID") SSO_CLIENT_SECRET = os.environ.get("OAUTH_CLIENT_SECRET") -SSO_AUTH_URL = os.environ.get("OAUTH_AUTH_URL") -SSO_TOKEN_URL = os.environ.get("OAUTH_TOKEN_URL") -SSO_USERINFO_URL = os.environ.get("OAUTH_USERINFO_URL") # production ip_mask = "192.168.88.1-255" diff --git a/whois/web.py b/whois/web.py index 34b6035..5cf42a8 100644 --- a/whois/web.py +++ b/whois/web.py @@ -44,7 +44,7 @@ oauth = OAuth(app) oauth.register( "sso", - server_metadata_url="http://sso.hsp.sh/auth/realms/hsp/.well-known/openid-configuration", + server_metadata_url=settings.SSO_PROVIDER, client_kwargs={"scope": "openid profile email"}, )