diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index feedda6..f5b4aa6 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -237,7 +237,7 @@ cat source_env.local export HYDRA_ADMIN_URL=http://localhost:4445 export KRATOS_PUBLIC_URL=http://localhost/api export KRATOS_ADMIN_URL=http://localhost:8000 -export PUBLIC_URL=http://localhost/login +export LOGIN_PANEL_URL=http://localhost/web export DATABASE_URL="mysql+pymysql://stackspin:stackspin@localhost/stackspin" ``` diff --git a/areas/login/login.py b/areas/login/login.py index 8ab2fba..7912f06 100644 --- a/areas/login/login.py +++ b/areas/login/login.py @@ -176,13 +176,13 @@ def auth(): # The redirect URL is back to this page (auth) with the same challenge # so we can pickup the flow where we left off. if not identity: - url = PUBLIC_URL + "/auth?login_challenge=" + challenge + url = LOGIN_PANEL_URL + "/auth?login_challenge=" + challenge url = urllib.parse.quote_plus(url) current_app.logger.info("Redirecting to login. Setting flow_state cookies") current_app.logger.info("auth_url: " + url) - response = redirect(PUBLIC_URL + "/login") + response = redirect(LOGIN_PANEL_URL + "/login") response.set_cookie('flow_state', 'auth') response.set_cookie('auth_url', url) return response diff --git a/config.py b/config.py index cfcf05b..e976f35 100644 --- a/config.py +++ b/config.py @@ -6,7 +6,7 @@ HYDRA_CLIENT_SECRET = os.environ.get("HYDRA_CLIENT_SECRET") HYDRA_AUTHORIZATION_BASE_URL = os.environ.get("HYDRA_AUTHORIZATION_BASE_URL") TOKEN_URL = os.environ.get("TOKEN_URL") -PUBLIC_URL = os.environ.get('PUBLIC_URL') +LOGIN_PANEL_URL = os.environ.get('LOGIN_PANEL_URL') HYDRA_PUBLIC_URL = os.environ.get("HYDRA_PUBLIC_URL") HYDRA_ADMIN_URL = os.environ.get('HYDRA_ADMIN_URL') diff --git a/run_app.sh b/run_app.sh index 218949a..c85adab 100755 --- a/run_app.sh +++ b/run_app.sh @@ -31,7 +31,7 @@ export KRATOS_PUBLIC_URL=http://localhost/kratos export KRATOS_ADMIN_URL=http://localhost:8000 export HYDRA_PUBLIC_URL="https://sso.init.stackspin.net" export HYDRA_ADMIN_URL=http://localhost:4445 -export PUBLIC_URL=http://localhost/web/ +export LOGIN_PANEL_URL=http://localhost/web/ #export DATABASE_URL="mysql+pymysql://stackspin:stackspin@localhost/stackspin?charset=utf8mb4" export DATABASE_URL="mysql+pymysql://stackspin:IRvqAzhKMEdIBUUAWulIfZJLQgclLQDm@localhost/stackspin"