foolish-indigoF
Refine2y ago
12 replies
foolish-indigo

Supabase- Ability for admin user to add users

Hi everyone, I have a client who's plan for a crud app is to disable user signup as it'll be an internal tool. User accounts should only be created by a couple of admins. What's the best way of handling this? I found the following in the Supabase docs but was unsure of how best to tackle it within Refine.

const { data, error } = await supabase.auth.admin.createUser({
  email: 'user@email.com',
  password: 'password',
  user_metadata: { name: 'Yoda' }
})
Was this page helpful?