improved redirect url on login

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-09-04 14:50:46 +02:00
parent e372720dd2
commit e4148d88a8

View File

@@ -37,10 +37,9 @@
async function redirectTo(e,service){
console.log(redirectTo,{e:e,service:service})
const btn = e?.target;
if (btn) btn.disabled = true;
const url = api(`user/oidc/redirect/${service}?returnTo=${window.location.pathname}`);
const url = api(`user/oidc/redirect/${service}?returnTo=${encodeURIComponent(window.location.pathname)}`);
const resp = await fetch(url,{credentials:'include'});
if (resp.ok){
const json = await resp.json();