How to create a user without being authenticated/signed in as admin? #1190
-
First Check
Commit to Help
Example Code
DescriptionI have tried to use the backend API to create a user. How do you create a user without being authenticated as an admin? Operating SystemLinux, macOS Operating System DetailsRunning locally on macOS or Linux has been tried. Python VersionPython 3.10.13 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
By design, you can't. Only superusers can create new users. |
Beta Was this translation helpful? Give feedback.
-
Maybe you want that a new User can Register by hisself? For that i would recommend you to build new Endpoints with the Logic to Register as new User. Including Email approvement etc. The current Endpoints are not for User Self Registration so it makes sense that only Superuser can create new Users. |
Beta Was this translation helpful? Give feedback.
-
Hi there! while the frontend doesn't currently support this feature, we've already implemented the backend endpoint register_user. To enable user registration, simply set USERS_OPEN_REGISTRATION to True in the .env file. After making this change, remember to restart the Docker containers using docker-compose up -d to apply the new environment variables. |
Beta Was this translation helpful? Give feedback.
-
I will update the docs to include this 😄 |
Beta Was this translation helpful? Give feedback.
Hi there! while the frontend doesn't currently support this feature, we've already implemented the backend endpoint register_user. To enable user registration, simply set USERS_OPEN_REGISTRATION to True in the .env file. After making this change, remember to restart the Docker containers using docker-compose up -d to apply the new environment variables.