[DEV] set the return sso to the same page

This commit is contained in:
Edouard DUPIN 2022-06-13 14:08:25 +02:00
parent c18628e22c
commit 8e27d80c33

View File

@ -28,7 +28,16 @@ export class SSOService {
if (data != undefined) {
return this.utf8_to_b64(data);
}
return this.utf8_to_b64('home');
let pathName = window.location.pathname;
console.log("start Path-name: '" + pathName + "'");
console.log("check with: '" + environment.applName + "/sso/" + "'");
if (pathName.startsWith("/sso/") || pathName.startsWith(environment.applName + "/sso/")) {
return this.utf8_to_b64('home');
}
if (pathName.startsWith(environment.applName + "/sso/")) {
pathName = pathName.substring(environment.applName.length + 1);
}
return this.utf8_to_b64(pathName);
}
/**
* Request SSO connection