ui: Empty provider list at login
This commit is contained in:
parent
285cce509a
commit
9206115301
|
@ -12,6 +12,7 @@
|
|||
import { t } from '$lib/translations';
|
||||
import { authUser, cleanUserSession } from '$lib/api/user';
|
||||
import type { LoginForm } from '$lib/model/user';
|
||||
import { providers } from '$lib/stores/providers';
|
||||
import { toasts } from '$lib/stores/toasts';
|
||||
import { refreshUserSession } from '$lib/stores/usersession';
|
||||
|
||||
|
@ -37,6 +38,7 @@
|
|||
.then(
|
||||
() => {
|
||||
cleanUserSession();
|
||||
providers.set(null);
|
||||
formSent = false;
|
||||
emailState = true;
|
||||
passwordState = true;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
import Logo from '$lib/components/Logo.svelte';
|
||||
import Toaster from '$lib/components/Toaster.svelte';
|
||||
import VoxPeople from '$lib/components/VoxPeople.svelte';
|
||||
import { providers } from '$lib/stores/providers';
|
||||
import { toasts } from '$lib/stores/toasts';
|
||||
import { t } from '$lib/translations';
|
||||
|
||||
|
@ -24,6 +25,7 @@
|
|||
window.onunhandledrejection = (e) => {
|
||||
if (e.reason.name == "NotAuthorizedError") {
|
||||
goto('/login');
|
||||
providers.set(null);
|
||||
toasts.addErrorToast({
|
||||
title: $t('errors.session.title'),
|
||||
message: $t('errors.session.content'),
|
||||
|
|
Loading…
Reference in New Issue