|
@@ -28,6 +28,12 @@
|
|
|
|
|
|
let ldapUsername = '';
|
|
let ldapUsername = '';
|
|
|
|
|
|
|
|
+ const querystringValue = (key) => {
|
|
|
|
+ const querystring = window.location.search;
|
|
|
|
+ const urlParams = new URLSearchParams(querystring);
|
|
|
|
+ return urlParams.get(key);
|
|
|
|
+ };
|
|
|
|
+
|
|
const setSessionUser = async (sessionUser) => {
|
|
const setSessionUser = async (sessionUser) => {
|
|
if (sessionUser) {
|
|
if (sessionUser) {
|
|
console.log(sessionUser);
|
|
console.log(sessionUser);
|
|
@@ -39,7 +45,9 @@
|
|
$socket.emit('user-join', { auth: { token: sessionUser.token } });
|
|
$socket.emit('user-join', { auth: { token: sessionUser.token } });
|
|
await user.set(sessionUser);
|
|
await user.set(sessionUser);
|
|
await config.set(await getBackendConfig());
|
|
await config.set(await getBackendConfig());
|
|
- goto('/');
|
|
|
|
|
|
+
|
|
|
|
+ const redirectPath = querystringValue('redirect') || '/';
|
|
|
|
+ goto(redirectPath);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|