improved redirect url on login
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -37,10 +37,9 @@
|
|||||||
|
|
||||||
|
|
||||||
async function redirectTo(e,service){
|
async function redirectTo(e,service){
|
||||||
console.log(redirectTo,{e:e,service:service})
|
|
||||||
const btn = e?.target;
|
const btn = e?.target;
|
||||||
if (btn) btn.disabled = true;
|
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'});
|
const resp = await fetch(url,{credentials:'include'});
|
||||||
if (resp.ok){
|
if (resp.ok){
|
||||||
const json = await resp.json();
|
const json = await resp.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user