Hey, is there a way to get a userId by their email...
# help
e
Hey, is there a way to get a userId by their email? Sth like
supabaseAdmin.auth.getUserByEmail(email)
or
supabaseAdmin.from("auth.users").select("id").eq("email", email)
?
b
I don't think you can do this for security reasons, but you could write a
PostgreSQL function
to do this (it would need to be a
security definer
function or it would need to be given explicit access to view the
auth
schema. Then it could get what you need and return it to the client.