Getting goTrue.js currentUser is always null

I cant seem to get the current user using goTrue.js. They have no documentation just examples that show intended responses.

My netlify site is https://chaste.gg but none of what Im doing is live its all on my local.

Im using sveltekit and I have a store where I try to get the current user

import { writable } from 'svelte/store';
import { browser } from '$app/environment';
import { auth } from '$src/gotrue';

let storedUser = browser && localStorage.getItem('user');
let persistedUser;

console.log('This is the stored user ' + storedUser);

if (storedUser) {
	persistedUser = await auth.currentUser();
	console.log(`This is the persisted user ${persistedUser}`);
	storedUser = { email: persistedUser.email };
}

export let user = writable(storedUser ? JSON.parse(storedUser) : '');

if (browser) {
	user.subscribe((u) => (localStorage.user = u));
}

The response from auth.currentUser() is always null.

I think the localstorage item is gotrue.user and not user. Are you sure you’re storing/accessing it right?