getUser and Session returning null even when authenticated
Preface: NextJS
Whenever I sign in it is fine but then after a bit of working on the website and refreshing, supabase auth loses the user (getUser returns null) which redirects to login, but then getSession has a session, so it redirects back to my protected pages which results in an infinite loop. Any help?
Whenever I sign in it is fine but then after a bit of working on the website and refreshing, supabase auth loses the user (getUser returns null) which redirects to login, but then getSession has a session, so it redirects back to my protected pages which results in an infinite loop. Any help?