ui: Empty provider list at login

This commit is contained in:
nemunaire 2023-11-27 14:04:24 +01:00
parent 285cce509a
commit 9206115301
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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'),