Browse Source

improved redirect url on login

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
feature/singleton_registry
Stephan Richter 2 months ago
parent
commit
e4148d88a8
  1. 3
      frontend/src/Components/Login.svelte

3
frontend/src/Components/Login.svelte

@ -37,10 +37,9 @@ @@ -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();

Loading…
Cancel
Save