Skip to content

loading04/Flask_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask User Authentication

This is a Flask application that demonstrates user authentication using Flask, Flask-Login, and SQLAlchemy. Simple flask authentication using werkzeug

Installation

  1. Clone the repository:
git clone https://github.com/loading04/Flask_auth.git

2.Navigate to the project directory:

cd Flask_auth
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py

Usage

Once the application is running, you can access it by navigating to http://localhost:5000 in your web browser.

Routes

/ - Home page
/register - User registration page
/login - User login page
/secrets - Protected route that displays user information
/logout - Logout route
/download - Route to download a file (cheat_sheet.pdf)

Configuration

The application can be configured by modifying the following variables in the code:

SECRET_KEY - Secret key used for session encryption
SQLALCHEMY_DATABASE_URI - URI for the SQLite database file
SQLALCHEMY_TRACK_MODIFICATIONS - Tracks modifications to database models. Set to False to improve performance

Database

The application uses a SQLite database to store user information. The database schema is defined by the User class in the code. The table will be created automatically the first time the application is run. You can uncomment the db.create_all() line to create the table manually.

Dependencies

The application relies on the following dependencies:

Flask
Flask-Login
SQLAlchemy
Werkzeug

About

Simple flask authentication using werkzeug

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors