const { data, error } = await supabase.auth.admin.getUserByEmail(invitedUserEmail) #31186
Unanswered
MichaelJCole
asked this question in
Questions
Replies: 1 comment 1 reply
-
Not sure I follow your user flows, but you can have an postgres function (security definer type) select auth.users table where email = xxxx and return their id. This could be called by an rpc call from the REST API's. But you might want to remove grants on it from anon and authenticated users depending where you are using it. You normally don't want to allow probing of emails to the general public. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have an "invite user by email" feature to implement.
How can I get a user's id from their email? I want this for my "invites" table where users can accept/reject their invites in the app. Clicking the email link does not automatically accept the invite. My user flows are:
Invite new user:
Invite an existing user:
What's the "supabase way" to accomplish this?
How do I find the user by their email without paging through all the users?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions