# Implementing create new user in auth.users in supabase

**URL:** <https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883>\
**Category:** How do I?\
**Tags:** authentication, supabase\
**Created:** [December 11, 2023, 5:04pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883 "2023-12-11T17:04:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![maruf22](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@maruf22](https://community.weweb.io/u/maruf22)\
**Post date:** [December 11, 2023, 5:04pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/1 "2023-12-11T17:04:01Z")

</div>

Hello everyone.

Our team is building an MVP where a key feature is, an user (admin) can create multiple other users (by email and password).

I am using the Supabase, and Supabase Auth pluggins. Now, the `sign up with email and password` onviously changes the logged in users (admin’s) session, which makes sense as it wasn’t made for this use case of creating other users.

The pluggins do not give access to the `supabase.auth.admin.createUser()` method as far as I have tried, and also, the method requires `service_role` mentioned in the supabase docs, and I couldn’t find a way to add that config to the supabase pluggin.

I’ve also tried out creating a backend function `add_user` to add a new user to the auth.users table (which works in supabase sql editor), but unfortunately doesn’t work (permission denied) in case of .rpc call by the supabase pluggin instance.

Considering I am new to weweb and no-code in general, am I missing some actions given by these pluggins? So, in this case, I am wondering what could be the course of action in building out this feature.

Any kind of suggestions or insights would be much appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 11, 2023, 5:50pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/2 "2023-12-11T17:50:44Z")

</div>

We solved this in the DMs. The issue mostly is that the methods are unavailable due to WeWeb running the SDK v1.

---

<div class="post-metadata">

**Author:** ![kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kavi](https://community.weweb.io/u/kavi)\
**Post date:** [December 26, 2023, 8:01am UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/3 "2023-12-26T08:01:12Z")

</div>

I have same problem…  
I have to create an project in which **admin** users can add **member** users in supabase.  
Please help!

---

<div class="post-metadata">

**Author:** ![iannet](https://avatars.discourse-cdn.com/v4/letter/i/73ab20/32.png) [@iannet](https://community.weweb.io/u/iannet)\
**Post date:** [January 17, 2024, 12:03pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/5 "2024-01-17T12:03:25Z")

</div>

Hello I have the same issue and I am trying to find instruction on how to create a form in order for admin to create a new user with a temporary password and role using Supabase.

When a new user is added they would get a tempory password and would need to change it upon first login.

What is the best way to make that ?

Is there any documentation availaible ?

Thanks

---

<div class="post-metadata">

**Author:** ![cdev](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cdev](https://community.weweb.io/u/cdev)\
**Post date:** [March 25, 2024, 6:44pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/6 "2024-03-25T18:44:42Z")

</div>

I’m interested in how this would work as well @Broberto

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [March 25, 2024, 7:06pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/7 "2024-03-25T19:06:11Z")

</div>

You would need to implement a custom solution as Supabase doesn’t provide this out of the box. We did this on a few projects, but it’s really something that usually is tailored to your needs.

---

<div class="post-metadata">

**Author:** ![Corner](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Corner](https://community.weweb.io/u/Corner)\
**Post date:** [May 9, 2024, 7:11am UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/8 "2024-05-09T07:11:56Z")

</div>

What about setting up a sign up form, only displaying for admin users, that is called “Add users” ? In that way, admin users could populate the User table in the Auth schema

---

<div class="post-metadata">

**Author:** ![MathiasS-B](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mathiass-b/32/10201_2.png) [@MathiasS-B](https://community.weweb.io/u/MathiasS-B)\
**Post date:** [October 12, 2024, 11:01pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/9 "2024-10-12T23:01:57Z")

</div>

did you ever find a solution to your problem?  
or did you go away from weweb?

I’m sitting with the same problem and I’m considering making a edge function to do this. but I’m not all the way there jet

I know I’m a bit late to the talk 😃

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [October 12, 2024, 11:07pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/10 "2024-10-12T23:07:07Z")

</div>

Yes, you can use an Edge Function to do this, you would still need to safeguard the endpoint via any checks you do for whether the User is an Admin or privileged to do so.

> **[JavaScript: Create a user | Supabase Docs](https://supabase.com/docs/reference/javascript/auth-admin-createuser)**
>
> Supabase API reference for JavaScript: Create a user

You can also do this via a Postgres Function or as well apparently

> **[Programmatically create new users · supabase · Discussion #5043](https://github.com/orgs/supabase/discussions/5043)**
>
> Discovering supabase at the moment, really liking all the work! In the CLI there's mention of a seed.sql script which is a dev practice I love, but it's unclear to me how to programmatically insert...

---

<div class="post-metadata">

**Author:** ![dhew](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dhew](https://community.weweb.io/u/dhew)\
**Post date:** [May 23, 2025, 2:21pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/11 "2025-05-23T14:21:06Z")

</div>

For those looking for a possible solution to this problem, take a look at a tutorial thread I put together [here](https://community.weweb.io/t/supabase-create-and-delete-users-from-weweb-using-edge-functions/18382/2).

Hope it helps.

---

<div class="post-metadata">

**Author:** ![Antiokh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/antiokh/32/2794_2.png) [@Antiokh](https://community.weweb.io/u/Antiokh)\
**Post date:** [July 17, 2025, 5:47pm UTC](https://community.weweb.io/t/implementing-create-new-user-in-auth-users-in-supabase/5883/13 "2025-07-17T17:47:41Z")

</div>

Or just create a function in Supabase to create users from API without EDGE functions ( [Programmatically create new users · supabase · Discussion #5043](https://github.com/orgs/supabase/discussions/5043#discussioncomment-7314640))
