tiangolo / full-stack

Full stack, modern web application generator. Using Flask, PostgreSQL DB, Docker, Swagger, automatic HTTPS and more.
MIT License
523 stars 81 forks source link

Create API endpoint that allows the open registration of new users #6

Closed abnerjacobsen closed 6 years ago

abnerjacobsen commented 6 years ago

This PR creates a new endpoint in the users API that allows the creation of new accounts without the need to use an authentication token.

Its utility is for the case where users can create their own accounts through the API or when the frontend is done using only static html / javascript where it would not be possible to embed in the code the login data of a super user.

tiangolo commented 6 years ago

Thanks for your work @abnerjacobsen ! (and sorry for the delay)

I was thinking on just letting the open registration enabled by default, without the environment variable, but I think that your handling of the getenv_boolean was so elegant that I left all the env var stuff there, almost only to justify keeping that function :smile:

Thanks!