list all auth.users
is it possible to list all auth.users meta_data without creating public.users as to not have redundant table that serves no real purpose?
5 Replies
You would need to write a "security definer" function and call thru rpc if you want to do it from API. You might want to check in the function for user role otherwise anyone can get your list. You also might be able to use a view.
from what I understood is that I need to write a function that runs
and then call it via rpc?
also what do you mean by "use a view"?
https://supabase.com/docs/guides/database/tables#views
You would need to return setof json probably for your function, so would need to be done in SQL editor versus the function UI.
Tables and Data | Supabase
Creating and using Postgres tables.
Database Functions | Supabase
Creating and using Postgres functions.
Please do a google search on postgres functions and postgres views to see what a view is.