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

* Re: [PATCH pve-manager] fix #7337: Keep track of deep link on OpenID login
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Arthur Bied-Charreton @ 2026-03-12 10:49 UTC (permalink / raw)
  To: pve-devel

On Thu, Mar 12, 2026 at 11:12:27AM +0100, Arthur Bied-Charreton wrote:
> 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>
> 
[...]

Quick side note that this is also an issue in PBS, will send a follow-up
patch to the pbs list once we validate this approach/agree on another one
here. 




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

* applied: [PATCH pve-manager] fix #7337: Keep track of deep link on OpenID login
  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 ` Dominik Csapak
  1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-03-12 13:43 UTC (permalink / raw)
  To: pve-devel, Arthur Bied-Charreton

On Thu, 12 Mar 2026 11:12:27 +0100, Arthur Bied-Charreton wrote:
> 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.
> 
> [...]

Applied, thanks!

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




^ 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