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.
- HTML/CSS/JS for Frontend
- MySQL for Database
- Flask for rendering the application and CRUD operations
- Python Package for Password Encryption
The project in the talk has the following features :
Users can log in only if their credentials are present in the database.
Without logging in, the user cannot go to the next page, even using that particular page's routes.
When logged in, the user can go to other pages using routes or open the link on other tabs
After clicking on logout, the user cannot go to the next page again using routes.
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 :
Basic Knowledge in the following will be handy :
- HTML , CSS
- SQL queries like INSERT, SELECT, WHERE, LIKE
- 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.
Github : https://github.com/ayushhagarwal/Flask-SQL-Email-Authentication
Blog : https://blogs.ayushdev.com/flask-sql-email-authentication-project
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.