Supabase create user without login

I’m building a flow in WeWeb where an admin user should be able to create new Supabase users (for example, team members or clients).

The issue is that when I use Supabase’s signUp method, the newly created user is automatically logged in, which logs out the admin who is currently connected.

What I need is a way to create a user in Supabase without logging them in, keeping the admin session active.

Is there a native way to do this in WeWeb?

Or should I use a Server Action with secure permissions (Service Role Key) to create the user without affecting the current session?

According to the documentation – you need to create an Edge Function to use the auth.admin.createUser() function with the service-key which is highly sensitive and should be stored properly.

1 Like