0

I want admins to be able to signup new users. Issue is, whenever I create a new user, it logs out the admin and logs in the newly created user. Is there a way to disable the auto-login of the new user on signup?

Looking into using a cloud function to do that instead of directly from the client, but wondering if there's a way to avoid that, as I don't really need cloud functions for anything else.

Tsabary
  • 3,119
  • 2
  • 24
  • 66

1 Answers1

2

If a new account was created using a client-side SDK, the user is signed in automatically. Since this is an admin operation, I suggest you use the Firebase Admin SDK to create new user accounts for your app.

Another option is to use Firebase Auth REST API to create a new email and password user by issuing an HTTP Post request to the Auth signupNewUser endpoint.

looptheloop88
  • 3,026
  • 17
  • 20