© 2026 Hedgehog Software, LLC

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

Get authenticated user_id from twitter id

Hi,

What's the best way to query the auth tables to get the user_id given their twitter_id? Users can sign up via a magic link email and/or Twitter.

To get the twitter id given the user_id I can run
select raw_user_meta_data::json->'sub' from auth.users where id=[user_id]
select raw_user_meta_data::json->'sub' from auth.users where id=[user_id]
but how can I do the opposite?

Thanks!
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
User not authenticated ERROR
SupabaseSSupabase / help-and-questions
2mo ago
withPageAuth user undefined for authenticated user
SupabaseSSupabase / help-and-questions
4y ago
Supabase Rejecting firebase authenticated user coming from flutterflow
SupabaseSSupabase / help-and-questions
7mo ago