You are tasked to develop a Flask application that requires user authentication. How would you implement user authentication in a secure manner?

  • Implement custom authentication from scratch without any external libraries.
  • Store user credentials in plain text in the database.
  • Use a well-established authentication library like Flask-Login, Flask-Security, or Flask-Principal.
  • Use JavaScript for authentication.
To implement secure user authentication in a Flask application, it's advisable to use established authentication libraries that have been thoroughly tested for security vulnerabilities. Storing passwords in plain text (Option 2) is a security risk, and implementing custom authentication (Option 3) is error-prone. Using JavaScript (Option 4) for authentication is not recommended for security reasons.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *