From a078bb21ff49ee81ac116d35239a10b5ef0dff9d Mon Sep 17 00:00:00 2001 From: konarfil Date: Tue, 26 Sep 2023 15:04:04 +0200 Subject: [PATCH] Error redirect mechanism --- src/flow/code-2.html | 7 +++++-- src/flow/code-3.html | 4 ++++ src/flow/dag-2.html | 11 +++++++--- src/flow/expired.html | 48 +++++++++++++++++++++++++++++++++++++++++++ src/flow/pkce-2.html | 4 ++++ src/flow/pkce-3.html | 7 +++++-- src/flow/pkce-4.html | 4 ++++ 7 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 src/flow/expired.html diff --git a/src/flow/code-2.html b/src/flow/code-2.html index 751595d..1098750 100644 --- a/src/flow/code-2.html +++ b/src/flow/code-2.html @@ -97,13 +97,16 @@ + + + + + +
+
+
+
+
+
+
+
Your flow has expired
+

+ Flow could not continue as it was missing vital information. This can be caused by not performing the flow before codes and/or cookies expire, or by manually navigating to section of a flow, before finishing previous steps. Please start the flow again. +

+ +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/flow/pkce-2.html b/src/flow/pkce-2.html index c90dc6e..1e8e4e2 100644 --- a/src/flow/pkce-2.html +++ b/src/flow/pkce-2.html @@ -186,6 +186,10 @@ const state = generateSessionState(); const codeChallenge = getCookie("code_challenge"); + if (!codeChallenge) { + window.location = "/flow/expired"; + } + setCookie("pkce-state", state, 5); fillExample(); $("#sendRequestBtn").attr("href", constructRequestUrl()); diff --git a/src/flow/pkce-3.html b/src/flow/pkce-3.html index 3eeef09..c38c9c7 100644 --- a/src/flow/pkce-3.html +++ b/src/flow/pkce-3.html @@ -110,13 +110,16 @@