© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
1 reply
Tailor

both auth code and code verifier should be non-empty

Hi there, I am trying to create a reset password feature. Please check the screenshots provided. First, I call the
sendResetEmail
sendResetEmail
function. I open the link in the SAME browser and when I call the
supabase.auth.exchangeCodeForSession(code)
supabase.auth.exchangeCodeForSession(code)
I get the error
both auth code and code verifier should be non-empty
both auth code and code verifier should be non-empty
. Why is that? What should I be doing differently?

Update: I might know what's wrong. The domain where I request the password reset is
app.localhost:3000
app.localhost:3000
, but the API is located at
localhost:3000/auth/callback
localhost:3000/auth/callback
so probably the cookie is not set there and that's why its not failing.

Any suggestion on how to handle this?
image.png
Screenshot_2024-01-11_at_13.41.31.png
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

Social Oauth - 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