How I built a user authentication application with Flask and MySQL Database

Ayush Kumar Agarwal (~ayushgrwl365)


With growing interest in the field of web development and web applications, the need of a secure login validation is also growing. A secure login validation system not only ensures security but also makes any application more robust and is good for user experience.

The talk is about building a user authentication system. We will be talking about creating a logic to implement signup, login, and logout using the below mentioned tech stack.

Tech Stack:

  1. HTML/CSS/JS for Frontend
  2. MySQL for Database
  3. Flask for rendering the application and CRUD operations
  4. Python Package for Password Encryption

The project in the talk has the following features :

  1. Users can log in only if their credentials are present in the database.

  2. Without logging in, the user cannot go to the next page, even using that particular page's routes.

  3. When logged in, the user can go to other pages using routes or open the link on other tabs

  4. After clicking on logout, the user cannot go to the next page again using routes.

  5. If the email or username already exists in the database, the user will not create the account.

Basic Outline of the Talk :

  • Speaker Introduction - ( 1 minutes)
  • Project/Talk Introduction and overview of Project Tech Stack : ( 2 minutes)
  • Presenting the basic boiler of the project, the database upon which the user authentication will be built live. Audience will have access to the boiler and can build along the talk : (3 minutes)
  • Setting up the boiler and go through the libraries used in the project : ( 1 minutes)
  • Building password encryption and adding the sign up/registration of user functionality : (10 minutes)
  • Adding login functionality on the project : (5 minutes)
  • Conclusion, my experience with the project, discussion on future prospects of the project : (1 minute)
  • QnA Round with the audience : (5 minutes)

Demo PPT to be presented :

PPT Link


Basic Knowledge in the following will be handy :

  1. HTML , CSS
  2. SQL queries like INSERT, SELECT, WHERE, LIKE
  3. Rendering HTML CSS pages using Flask server.

Deep experience in any of the tech stacks mentioned is not required.

Who's this talk for?

  • Anyone who's curious to know how SQL database can be used in a Flask Application.
  • Anyone who's curious to learn about using Flask as a backend instead of traditional tools like Node and Express.
  • Anyone who's curious to setup a full user authentication system with just a few lines of code and easy readability.
  • Anyone who's curious to learn encrypting password using python package.

Video URL:

Content URLs:

Github :

Blog :

Speaker Info:

I am a web developer ,currently working at Amadeus Software Labs as a Full Stack Web Developer, Intern. My love for computer science and tech started at Pycon India 2018 and since then I have tried to explore many different tech stacks. I love being involved in the developer community through Twitter, Blogs and Conferences.

Speaker Links:

Personal Blog : Portfolio | Github | Twitter

Section: Web development
Type: Talks
Target Audience: Beginner
Last Updated: