From 3b8f8f8fe4fe8e41e91ece2fa284dc940278f6af Mon Sep 17 00:00:00 2001 From: mia Date: Fri, 19 Jul 2024 17:46:50 -0700 Subject: properly redirect successful auth requests to the target uri --- nginx/handoff.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nginx/handoff.html') diff --git a/nginx/handoff.html b/nginx/handoff.html index c160580..f012451 100644 --- a/nginx/handoff.html +++ b/nginx/handoff.html @@ -12,7 +12,11 @@ location = "https://dissociate.mia.jetzt/logout"; } await fetch(`/.nginx/cookie?token=${data.token}&max_age=${data.expiresIn - 60}`); - location = "/"; + if (location.hash) { + location = location.hash.slice(1); + } else { + location = "/"; + } } else { console.log("not authenticated, redirecting"); location = "https://dissociate.mia.jetzt/login"; -- cgit 1.4.1