© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
4 replies
Paul

Social Oauth - both auth code and code verifier should be non-empty

I'm getting this error as well. There are a bunch of threads already.

I'm using Next14 and
@supabase/ssr
@supabase/ssr
.

I've tried
createBrowserClient
createBrowserClient
on the page and
createServerClient
createServerClient
in a form action.

In both cases when I try to
const { error } = await supabase.auth.exchangeCodeForSession(code);
const { error } = await supabase.auth.exchangeCodeForSession(code);


I get

AuthApiError: invalid request: both auth code and code verifier should be non-empty

I've tried both
createBrowserClient
createBrowserClient
on the page and
createServerClient
createServerClient
for the supabase instanciation.

Not sure what else to try. 🤷‍♂️
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

both auth code and code verifier should be non-empty
SupabaseSSupabase / help-and-questions
3y ago
[AuthApiError]: invalid request: both auth code and code verifier should be non-empty
SupabaseSSupabase / help-and-questions
7mo ago
AuthApiError: invalid request: both auth code and code verifier should be non-empty
SupabaseSSupabase / help-and-questions
14mo ago
AuthApiError: invalid request: both auth code and code verifier should be non-empty
SupabaseSSupabase / help-and-questions
2y ago