User table password best practices on new/update

Options

Should filters for length/upper/lower/digits be setup on the password field in the user table? And/or should I use filters on the inputs of the new user and change password API's?

If I set the requirements on the field in the user table, can I just enforce the requirements on my front-end?

TIA

Comments

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    Hi, @EricP. Enforcing at the database level ensures that none of your APIs that write to the password field can do so without obeying the parameters set by the filters, and you don't need to populate filters on the inputs. However, it may be easier for you to also enforce this on your front-end depending on which one you're using and how it behaves when an API returns an error response. Hope this helps! Let me know if you have any other questions.