Skip to content
Snippets Groups Projects
Commit 46624cbe authored by Frank Lange's avatar Frank Lange
Browse files

add a separate setting for the socialaccount login error page

parent 0599914e
No related branches found
No related tags found
No related merge requests found
...@@ -6,3 +6,5 @@ IAM4NFDI_CLIENT_ID= ...@@ -6,3 +6,5 @@ IAM4NFDI_CLIENT_ID=
IAM4NFDI_CLIENT_SECRET= IAM4NFDI_CLIENT_SECRET=
# Redirect URI should point to the frontend's /auth/callback/iam4nfdi page (absolute URL). # Redirect URI should point to the frontend's /auth/callback/iam4nfdi page (absolute URL).
IAM4NFDI_REDIRECT_URI= IAM4NFDI_REDIRECT_URI=
# Frontend page to redirect to when OIDC login flow fails (absolute URL).
IAM4NFDI_LOGIN_ERROR_PAGE=
...@@ -147,10 +147,11 @@ SOCIALACCOUNT_PROVIDERS = {} ...@@ -147,10 +147,11 @@ SOCIALACCOUNT_PROVIDERS = {}
IAM4NFDI_CLIENT_ID = os.environ.get("IAM4NFDI_CLIENT_ID", None) IAM4NFDI_CLIENT_ID = os.environ.get("IAM4NFDI_CLIENT_ID", None)
IAM4NFDI_CLIENT_SECRET = os.environ.get("IAM4NFDI_CLIENT_SECRET", None) IAM4NFDI_CLIENT_SECRET = os.environ.get("IAM4NFDI_CLIENT_SECRET", None)
IAM4NFDI_REDIRECT_URI = os.environ.get("IAM4NFDI_REDIRECT_URI", None) IAM4NFDI_REDIRECT_URI = os.environ.get("IAM4NFDI_REDIRECT_URI", None)
IAM4NFDI_LOGIN_ERROR_PAGE = os.environ.get("IAM4NFDI_LOGIN_ERROR_PAGE", None)
if IAM4NFDI_CLIENT_ID and IAM4NFDI_CLIENT_SECRET and IAM4NFDI_REDIRECT_URI: if IAM4NFDI_CLIENT_ID and IAM4NFDI_CLIENT_SECRET and IAM4NFDI_REDIRECT_URI and IAM4NFDI_LOGIN_ERROR_PAGE:
HEADLESS_FRONTEND_URLS = { HEADLESS_FRONTEND_URLS = {
"socialaccount_login_error": IAM4NFDI_REDIRECT_URI, "socialaccount_login_error": IAM4NFDI_LOGIN_ERROR_PAGE,
} }
SOCIALACCOUNT_PROVIDERS["openid_connect"] = { SOCIALACCOUNT_PROVIDERS["openid_connect"] = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment