Returns the signed-in user, or redirects to /login.
/login
Use at the top of every Server Action and data function that requires authentication. Never returns null — a missing session triggers a redirect.
null
The current user.
Redirects to /login when no session is present.
Returns the signed-in user, or redirects to
/login.Use at the top of every Server Action and data function that requires authentication. Never returns
null— a missing session triggers a redirect.