Skip to content

Your users get logged out after an hour

Login works when you test it, but people who leave the app open come back to errors or a login screen. Usually the session token expires and nothing refreshes it.

A login bug you won't catch right after a deploy: everything works for the first hour, then it doesn't.

Login sessions use a short-lived access token. In Supabase it lasts an hour by default, and the app is supposed to swap it for a fresh one. In many AI-built apps, often server-rendered Next.js ones, that refresh step is missing or only runs in the browser. So someone leaves a tab open, comes back after lunch, clicks "Save" and gets an error, an empty page or a surprise login screen.

The fix: follow your auth provider's setup for your framework. For Supabase with Next.js, that means the middleware that refreshes the session on every request.

Test it: log in, leave the tab alone for over an hour, then click something that loads your data.

Want your signup and login flows watched for you? Start with a free check at FunnelSitter.