Skip to content

Commit

Permalink
fix: fix passwordless loging session refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jul 7, 2024
1 parent 9a6415c commit 46235a4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { goto, invalidate, invalidateAll } from '$app/navigation';
import { page } from '$app/stores';
import * as m from '$i18n/messages';
import { handleMessage } from '$lib/components/layout/toast-manager';
Expand Down Expand Up @@ -65,7 +66,8 @@ async function waSignin() {
} else {
const { session, error: signInError } = await nhost.auth.signIn({ email: $formData.email, securityKey: true });
if (session) {
goto('/dashboard');
await invalidateAll()
await goto('/dashboard');
handleMessage({ type: 'success', message: 'Signin sucessfull 😎' } as const, toastStore);
} else {
log.error(signInError);
Expand Down

0 comments on commit 46235a4

Please sign in to comment.