I wanted to know what are the best practices to creates accounts on a deployment? Is there a way to create an account on deployment? Should you leave the create user router open on initial deployment and then remove it from being public after you create the admin account?
I would create a custom command that is used to create super users the same way Django etc… handles it.
As @warplydesigned said you can use a custom command. Another way to do it is to create a migration that creates an initial user. That will actually be in the Auth chapter I’m currently writing!
Awesome sauce! I’ve been fleshing out my app quite a bit, but there are some basic stuff missing still. I hope this chapter helps.