[PATCH proxmox-backup v3 20/23] login: Handle OAuth2 callback

Arthur Bied-Charreton
2026-04-15T07:03:32Z

The callback handler detects whether a login was triggered as the result
of an OAuth2 redirect and handles it accordingly by sending the
authorization code to the parent window. No-op on normal logins.

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

diff --git a/www/Application.js b/www/Application.js
index e82ccdd0..f2c652e5 100644
--- a/www/Application.js
+++ b/www/Application.js
@@ -57,6 +57,8 @@ Ext.define('PBS.Application', {
var provider = new Ext.state.LocalStorageProvider({ prefix: 'ext-pbs-' });
Ext.state.Manager.setProvider(provider);

+ Proxmox.OAuth2.handleCallback(new URLSearchParams(window.location.search));
+
let isOpenIDLogin = Proxmox.Utils.getOpenIDRedirectionAuthorization() !== undefined;
let alreadyLoggedIn = Proxmox.Utils.authOK();

--
2.47.3