refactor(auth): change behavior of disconnect button, now ends authentik session for app only
This commit is contained in:
parent
b0de761645
commit
e8f72178b2
|
|
@ -31,6 +31,10 @@ export const useAuthStore = defineStore('auth', () => {
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
user.value = undefined;
|
user.value = undefined;
|
||||||
|
AuthService.logout();
|
||||||
|
const logout_popup = window.open('https://auth.targo.ca/application/o/montargo/end-session/', 'logoutPopup', 'width=200,height=200');
|
||||||
|
|
||||||
|
setInterval(() => logout_popup?.close(), 2000);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAuthMessage = async (event: MessageEvent) => {
|
const handleAuthMessage = async (event: MessageEvent) => {
|
||||||
|
|
@ -61,13 +65,13 @@ export const useAuthStore = defineStore('auth', () => {
|
||||||
return { status: 400, message: 'unknown error occured' };
|
return { status: 400, message: 'unknown error occured' };
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
authError,
|
authError,
|
||||||
login,
|
login,
|
||||||
oidcLogin,
|
oidcLogin,
|
||||||
logout,
|
logout,
|
||||||
getProfile
|
getProfile
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user