Single-sign on flask web application
Go to file
Edward Betts ad38ed9136 Add support for web app unprivileged view 2024-02-25 09:10:55 +00:00
UniAuth Add support for web app unprivileged view 2024-02-25 09:10:55 +00:00
templates Add option to logout 2024-01-21 15:24:33 +00:00
.gitignore Initial commit 2024-01-21 09:10:07 +00:00
LICENSE Initial commit 2024-01-21 09:10:07 +00:00 Initial commit 2024-01-21 09:10:07 +00:00 Rename cookie and refactor code 2024-02-19 09:45:17 +00:00


UniAuth is a single sign-on application designed to provide a secure and efficient method for managing user authentication. The application is built using Flask, a popular web framework in Python, and offers a straightforward implementation suitable for integrating into various web services.


  • Token-Based Authentication: Generates and verifies secure authentication tokens.
  • Login Required Decorator: Enhances routes to require user authentication.
  • User Authentication: Validates username and password against stored credentials.
  • Secure Cookie Handling: Sets authentication tokens in cookies with security best practices.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.


  • Python 3
  • Flask
  • Werkzeug
  • ItsDangerous


  1. Clone the repository:
    git clone
  2. Install the required packages:
    pip install flask werkzeug itsdangerous
  3. Set up the configuration in config/

Running the Application

Run the application using:


The application should now be running on


  • Login: Users can log in by providing their username and password.
  • Token Generation: Upon successful login, a secure token is generated and stored in a cookie.
  • Access Protected Routes: Only authenticated users can access protected routes.


Contributions are welcome. If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with descriptive messages.
  4. Push your changes to your fork.
  5. Create a pull request to the main repository's main branch.


This project is licensed under the MIT License. Feel free to use, modify, and distribute it as per the license terms. See the LICENSE file for details.


  • Flask team for the great web framework
  • ItsDangerous for secure token generation

This README provides a basic overview and guide for your application. You can further customize it to include more detailed documentation as needed.