Skip to content

Tag: authentication

How to properly add admin user to a database?

Let’s say I have an endpoint for posting new users with a logic like this: This would work but now of course every user could set the isAdmin flag. Another way would be adding admin users manually to the database but this is probably not the best way. Is there a recommended way to solve this problem? An…