user is undefined on pages which arent the login page

As the title says, when I try to get the user object with
supabase.auth.api.getUser(context.req)
it is undefined on any page which isnt the login page.
Was this page helpful?