SupabaseS
Supabase4y ago
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] but how can I do the opposite?

Thanks!
Was this page helpful?