© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago
Joekitz

Sub claim in supabase auth token not working

Here is the error:
Log ID
6cffa2d8-32f1-4d54-92f9-1a60ad5ec2dd

Log Timestamp (UTC)
2023-12-18T04:10:53.000Z

Log Event Message
{"component":"api","error":"401: invalid claim: missing sub claim","level":"info","method":"GET","msg":"401: invalid claim: missing sub claim","path":"/user","referer":"https://ostira.com","remote_addr":"157.245.130.122","time":"2023-12-18T04:10:53Z","timestamp":"2023-12-18T04:10:53Z"}

For some reason when I create the user it automatically confirms it and doesn't indicate that it needs confirmation, normally it would wait for. The supabase auth email still goes through with the code and everything, but when I click on it, it gives me the above 401 error, which is triggered when I exchange the code for the session:

const session = await supabase.auth.exchangeCodeForSession(code);


This just became an issue. Any ideas?
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

Supabase OAuth (Slack) throws "invalid claim: missing sub claim"
SupabaseSSupabase / help-and-questions
3y ago
supabase.auth.setSession() not working in serverless function
SupabaseSSupabase / help-and-questions
4y ago
401: invalid claim: missing sub claim
SupabaseSSupabase / help-and-questions
3y ago
supabase cli auth issues: supabase link not working
SupabaseSSupabase / help-and-questions
4mo ago