Merge pull request 'refactor(auth): change behavior of disconnect button, now ends authentik session for app only' (#68) from dev/nicolas/staging-prep into main
Reviewed-on: Targo/targo_frontend#68
This commit is contained in:
commit
7f8af939d6
|
|
@ -31,6 +31,10 @@ export const useAuthStore = defineStore('auth', () => {
|
|||
|
||||
const logout = () => {
|
||||
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) => {
|
||||
|
|
@ -61,13 +65,13 @@ export const useAuthStore = defineStore('auth', () => {
|
|||
return { status: 400, message: 'unknown error occured' };
|
||||
}
|
||||
|
||||
return {
|
||||
user,
|
||||
authError,
|
||||
login,
|
||||
oidcLogin,
|
||||
logout,
|
||||
getProfile
|
||||
return {
|
||||
user,
|
||||
authError,
|
||||
login,
|
||||
oidcLogin,
|
||||
logout,
|
||||
getProfile
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user