© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
Noah

Next.js protect login page from authenticated users

I want to redirect logged in users back to the application when they visit the login page.

I used to be able to call
const { user } = await getUser(ctx);
const { user } = await getUser(ctx);
from gSSP but that's no longer possible. How can I achieve this with the latest version?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Next.js, user doesn't get authenticated
SupabaseSSupabase / help-and-questions
4y ago
Cannot read from database in next.js page
SupabaseSSupabase / help-and-questions
4y ago
Next Js 14 RLS only for authenticated user not working
SupabaseSSupabase / help-and-questions
3y ago
Best practice to protect users sensitive data
SupabaseSSupabase / help-and-questions
3y ago