From f07ca5514ee356933ceb1198a97e878f25f8c4f4 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Mon, 16 Nov 2026 09:01:09 -0700 Subject: [PATCH] Sign-in page: replace itself in the history when it hands back the code After a successful sign-in the page sent the browser on to the app with location.assign, which leaves the sign-in page behind in the history. In an installed app, Back from the app then landed on a spent sign-in form; the console had already used its state, so signing in there failed. It now uses location.replace. Minified and gzipped copies rebuilt with resources/scripts/minify_html.sh --gzip. Fixes #403 --- resources/html-templates/login.html | 5 ++++- resources/html-templates/login.html.min | 2 +- resources/html-templates/login.html.min.gz | Bin 11298 -> 11295 bytes 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/html-templates/login.html b/resources/html-templates/login.html index d3e5ed69..971cbf2e 100644 --- a/resources/html-templates/login.html +++ b/resources/html-templates/login.html @@ -486,7 +486,10 @@ target.searchParams.set('code', clientCode); if (oauth.state) target.searchParams.set('state', oauth.state); target.searchParams.set('iss', issuer || url.origin); - window.location.assign(target.toString()); + // Replace, not assign: once used, this page is spent, and an + // app that opened it shouldn't find it again behind Back + // (inbuxa-server #403). + window.location.replace(target.toString()); } function handleResponse(resp) { diff --git a/resources/html-templates/login.html.min b/resources/html-templates/login.html.min index c8e2b76e..4a4c4814 100644 --- a/resources/html-templates/login.html.min +++ b/resources/html-templates/login.html.min @@ -1 +1 @@ - Sign in · inbuxa

Sign in

Enter your credentials to continue

\ No newline at end of file + Sign in · inbuxa

Sign in

Enter your credentials to continue

\ No newline at end of file diff --git a/resources/html-templates/login.html.min.gz b/resources/html-templates/login.html.min.gz index e2ed231caceb32c170486148b7d8671db01b9df0..d1764f06f5d3a58456d232d65cfd5c2f512ef28b 100644 GIT binary patch delta 1079 zcmV-71jzfMSf5z1_$PlWGV%iaE~q5IrJ98D?Cza4J!lm`bpM=NV~Soicis%~AD0xD zZP06)*T2eD>)?Rd3S_8DU1=Ur5%D(XUFO0Nw5Ob4Tb_YY2k|AbU6?~v+1>qv`*L0S zN^_<3aCf*VZ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