Are you desireous of having email authentication in your Flask web application? Do you need users to log in to your website to receive special privilages? Perhaps they can view certain pages that the regular public (non-authenticated) cannot see. Perhaps you want, eventually, to be able to set up a blogging site. Perhaps users can add entries into a databse table that contains a list of organizations and their websites.
🔁 A Typical Signup Flow
- User submits the signup form
- routes.py handles the /signup POST route
- It saves the user to users.db with confirmed = 0
- It sends a confirmation email using Flask-Mail + Itsdangerous
- When user clicks the email link, the /confirm/
route verifies and updates the database
Folder Structure
/Flask_Auth_Email │ ├── app/ │ ├── __init__.py │ ├── routes.py │ ├── models.py │ └── templates/ │ ├── login.html │ ├── signup.html │ └── confirm.html ├── config.py ├── users.db ├── run.py └── requirements.txt