diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/openid_blueprint.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/openid_blueprint.py index c4e88da9..1e77b8f7 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/openid_blueprint.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/openid_blueprint.py @@ -55,6 +55,7 @@ def well_known() -> dict: @openid_blueprint.route("/auth", methods=["GET"]) def auth() -> str: """Accepts a series of parameters.""" + host_url = current_app.config.get("SPIFFWORKFLOW_BACKEND_URL") or request.host_url.strip("/") return render_template( "login.html", state=request.args.get("state"), @@ -63,6 +64,7 @@ def auth() -> str: scope=request.args.get("scope"), redirect_uri=request.args.get("redirect_uri"), error_message=request.args.get("error_message", ""), + host_url=host_url, ) @@ -81,6 +83,7 @@ def form_submit() -> Any: url = request.values.get("redirect_uri") + "?" + urlencode(data) return redirect(url) else: + host_url = current_app.config.get("SPIFFWORKFLOW_BACKEND_URL") or request.host_url.strip("/") return render_template( "login.html", state=request.values.get("state"), @@ -89,6 +92,7 @@ def form_submit() -> Any: scope=request.values.get("scope"), redirect_uri=request.values.get("redirect_uri"), error_message="Login failed. Please try again.", + host_url=host_url, ) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html index 815275d2..26d2e97a 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/openid_blueprint/templates/login.html @@ -1,38 +1,70 @@ - + - + Login Form - - - + + +
- Small SpiffWorkflow logo + Small SpiffWorkflow logo

Login

{{error_message}}
-
-

Important: This login form is for demonstration purposes only. In production systems you should - be using a real Open ID System.

- -

- -

- - - - - - -

+ +

+ Important: This login form is for demonstration purposes only. + In production systems you should be using a real Open ID System. +

+ +

+ +

+ + + + + + +

-
-
- + + +