all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pve-manager] fix #7337: Keep track of deep link on OpenID login
@ 2026-03-12 10:12 Arthur Bied-Charreton
  2026-03-12 10:49 ` Arthur Bied-Charreton
  2026-03-12 13:43 ` applied: " Dominik Csapak
  0 siblings, 2 replies; 3+ messages in thread
From: Arthur Bied-Charreton @ 2026-03-12 10:12 UTC (permalink / raw)
  To: pve-devel

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

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

Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
 www/manager6/Workspace.js          | 5 +++++
 www/manager6/window/LoginWindow.js | 1 +
 2 files changed, 6 insertions(+)

diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index b8061c2a..0f0e6ffb 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -49,6 +49,11 @@ Ext.define('PVE.Workspace', {
                 handler: function (data) {
                     me.login = null;
                     me.updateLoginData(data);
+                    let deeplink = sessionStorage.getItem('openid-deeplink');
+                    if (deeplink) {
+                        sessionStorage.removeItem('openid-deeplink');
+                        Ext.History.add(deeplink);
+                    }
                     Proxmox.Utils.checked_command(Ext.emptyFn); // display subscription status
                 },
             });
diff --git a/www/manager6/window/LoginWindow.js b/www/manager6/window/LoginWindow.js
index 324861ec..aacb8f2f 100644
--- a/www/manager6/window/LoginWindow.js
+++ b/www/manager6/window/LoginWindow.js
@@ -50,6 +50,7 @@ Ext.define('PVE.window.LoginWindow', {
 
             if (this.getViewModel().data.openid === true) {
                 const redirectURL = location.origin;
+                sessionStorage.setItem('openid-deeplink', window.location.hash);
                 Proxmox.Utils.API2Request({
                     url: '/api2/extjs/access/openid/auth-url',
                     params: {
-- 
2.47.3




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

end of thread, other threads:[~2026-03-12 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-12 10:12 [PATCH pve-manager] fix #7337: Keep track of deep link on OpenID login Arthur Bied-Charreton
2026-03-12 10:49 ` Arthur Bied-Charreton
2026-03-12 13:43 ` applied: " Dominik Csapak

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