π¨ Flask Email Verification App
A simple email verification web app built using Flask and Flask-Mail.
It allows users to enter their email, receive an OTP, and verify it β perfect for learning authentication and mail handling in Flask.
π Features
- Send OTP via Gmail using Flask-Mail
- Verify OTP in a separate form
- Bootstrap 5 UI (clean, modern design)
- Flash messages for user feedback
- Session-based OTP validation
ποΈ Project Structure
Flask_Email_Verification/
β
βββ app.py # Main Flask application
βββ requirements.txt # Project dependencies
βββ README.md # Project info
βββ templates/ # HTML templates
Β βββ index.html # Email input form
Β βββ verify.html # OTP verification form
βοΈ Installation
1. Clone this repository:
git clone https://github.com/eshuuux/Flask\_Email\_Verification.git
cd Flask_Email_Verification
2. Install dependencies:
pip install -r requirements.txt
3. Open app.py and update:
app.config["MAIL_USERNAME"] = "your_email@gmail.com"
app.config["MAIL_PASSWORD"] = "your_app_password"
4. Run the app:
python app.py
5. Visit:
π§ How It Works
- User enters their email on the home page.
- A random 6-digit OTP is generated.
- OTP is sent via Gmail using your app password.
- User enters OTP on the next screen to verify.
π App Password Setup (Required for Gmail)
- Turn on 2-Step Verification in your Google Account.
- Go to App Passwords.
- Select Mail and Other (Flask App) β Generate.
- Copy the 16-character code and use it in your app.
π§Ύ License
This project is open-source and available under the MIT License.
β¨ Author
Ashish Santosh Khote
π§ ashishkhoteak47@gmail.com
π» GitHub: eshuuuux