all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup v2] fix #7337: Keep track of deep link on OpenID login
@ 2026-03-19 10:55 Arthur Bied-Charreton
  2026-04-16 13:46 ` applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Arthur Bied-Charreton @ 2026-03-19 10:55 UTC (permalink / raw)
  To: pbs-devel

Previously, when opening a deep link without being logged into PBS, the
hash was getting lost, redirecting the user to #pbsDashboard instead of
/#<deeplink>.

Store `window.location.hash` in sessionStorage (per-tab storage) before
redirecting to the login URL, and add it to the history after successful
login to direct the user to the deeplink they opened.

`#pbsDashboard` remains the default redirect if no deeplink is stored.

Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
 www/LoginView.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/LoginView.js b/www/LoginView.js
index fd9594f6..2f737c5d 100644
--- a/www/LoginView.js
+++ b/www/LoginView.js
@@ -48,6 +48,7 @@ Ext.define('PBS.LoginView', {
 
             if (this.getViewModel().data.openid === true) {
                 const redirectURL = location.origin;
+                sessionStorage.setItem('pbsOpenIDDeeplink', location.hash);
                 try {
                     let resp = await Proxmox.Async.api2({
                         url: '/api2/extjs/access/openid/auth-url',
@@ -217,7 +218,13 @@ Ext.define('PBS.LoginView', {
                                 let creds = response.result.data;
                                 PBS.Utils.updateLoginData(creds);
                                 PBS.app.changeView('mainview');
-                                history.replaceState(null, '', `${redirectURL}#pbsDashboard`);
+                                let deeplink = sessionStorage.getItem('pbsOpenIDDeeplink');
+                                if (deeplink) {
+                                    sessionStorage.removeItem('pbsOpenIDDeeplink');
+                                    history.replaceState(null, '', `${redirectURL}${deeplink}`);
+                                } else {
+                                    history.replaceState(null, '', `${redirectURL}#pbsDashboard`);
+                                }
                             },
                         });
                     }
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

* applied: [PATCH proxmox-backup v2] fix #7337: Keep track of deep link on OpenID login
  2026-03-19 10:55 [PATCH proxmox-backup v2] fix #7337: Keep track of deep link on OpenID login Arthur Bied-Charreton
@ 2026-04-16 13:46 ` Fabian Grünbichler
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2026-04-16 13:46 UTC (permalink / raw)
  To: pbs-devel, Arthur Bied-Charreton


On Thu, 19 Mar 2026 11:55:07 +0100, Arthur Bied-Charreton wrote:
> Previously, when opening a deep link without being logged into PBS, the
> hash was getting lost, redirecting the user to #pbsDashboard instead of
> /#<deeplink>.
> 
> Store `window.location.hash` in sessionStorage (per-tab storage) before
> redirecting to the login URL, and add it to the history after successful
> login to direct the user to the deeplink they opened.
> 
> [...]

Applied, thanks!

[1/1] fix #7337: Keep track of deep link on OpenID login
      commit: 00d70197f8a061e6028080ed407073d594f9798d

Best regards,
-- 
Fabian Grünbichler <f.gruenbichler@proxmox.com>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-16 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-19 10:55 [PATCH proxmox-backup v2] fix #7337: Keep track of deep link on OpenID login Arthur Bied-Charreton
2026-04-16 13:46 ` applied: " Fabian Grünbichler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal