Check if user is logged in
Hi , I am trying to simply check if the user is logged in = has a session cookie "access _token " . But if I get the cookie in a formula via "get http only cookie " it returns the placeholder { {cookies . . . . } } - so it is never empty , also not if there is no cookie . Whats the best way to simply check if the user is logged in ? PS : I dont want to make an api call just to now if the user is logged in . One idea would be to use session storage for that , but also not ideal I guess . Http only cookies are not available in JS - and therefore in the toddle runtime . That formula is only returning a cookie 's value during SSR /proxied request calls . Internally in the toddle editor , we use an API call to Supabase to check if a user is signed in . We call this during SSR as well . hmm okay didnt thought about that the runtime is JS and thats the reason . but would that mean that I also can 't use this information in the fetch trigger for this api call ? so I would need to make this call always , also if the token would be empty ? (this is the case in 99 ,9 % of my page calls ) What should we implement exactly ? It 's possible to render things during SSR so UI meant for authenticated users is never shown . You can also create separate pages that are only for authenticated users that will never load for unauthenticated users if you set up a redirect rule on an API response