Skip to content

eshuuux/Flask_Email_Verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¨ 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:

http://127.0.0.1:5000

🧠 How It Works

  1. User enters their email on the home page.
  2. A random 6-digit OTP is generated.
  3. OTP is sent via Gmail using your app password.
  4. User enters OTP on the next screen to verify.

πŸ” App Password Setup (Required for Gmail)

  1. Turn on 2-Step Verification in your Google Account.
  2. Go to App Passwords.
  3. Select Mail and Other (Flask App) β†’ Generate.
  4. 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published