Skip to content

A Simple Authentication System for managing user login & registration in Flask/Python with SQLAlchemy.

License

Notifications You must be signed in to change notification settings

anuraagnagar/flask-user-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

User Authentication System in Flask/Python

A Simple Authentication System Project with basic user functionality in Python Flask with SQLAlchemy.

๐Ÿ‘ฉโ€๐Ÿ’ป Live Demo

Project features & functionality

  • Create account
  • Log In via (Username & Email address)
  • Logout
  • Account activation via verification link
  • Reset password via reset link
  • Reset new email via confirmation link
  • Update profile details & add profile image
  • Change password after login

Framework & Library

  1. Flask
  2. Flask-Login
  3. Flask-SQLAlchemy
  4. Flask-WTF
  5. Flask-Mail
  6. Flask-Migrate
  7. Bootstrap-Flask
  8. Jinja2

Application Screenshots

Register Page

Register

Login Page

Login

Forgot Password Page

Forgot Password

Reset Password Page

Reset Password

Reset Email Page

Reset Email

Home Page

Home

Edit Profile Page

Edit Profile

Change Password Page

Change Password

Set up & Run locally.

1. Clone the git repository.

git clone https://github.com/anuraagnagar/flask-user-authentication.git

2. Go to the project directory.

cd flask-user-authentication

3. Create virtual environment.

python3 -m venv venv

4. Activate the environment.

On Windows

venv\scripts\activate

On MacOS/Linux

source venv/bin/activate

To run this project locally, you will need to change .env.example file to .env on base directory and set the environment variables.

5. Install the requirement packages.

pip install -r requirements.txt

6. Migrate/Create a database.

Note: Before initializing the database, run the flask run command in your terminal to ensure that the application is set up properly. This allows you to access the flask db command for database migrations.

Initialize the database migration directory.

flask db init

Run migrate command.

flask db migrate -m "initial_migration"

Upgrade the database for latest migration.

flask db upgrade

7. Last to run the server.

Once the database is set up, you can run the Flask server to start your application.

flask run

To access this application open http://localhost:5000 in your web browser.

Contributing

Contributions are welcome! If you find a bug or want to add a new feature, please open an issue or submit a pull request. For more information checkout CONTRIBUTING.md

Licence

By contributing to this project, you agree that your contributions will be licensed under the MIT License.

Author

Anurag Nagar