/auth0-test-project-flask

This is a Flask project to demonstrate use of Auth0 authentication and token validation.

Primary LanguagePython

Auth0 Test Project with Flask

Python Flask Auth0 License

This is a simple Flask application that demonstrates how to integrate Auth0 for authentication in a Python web application.

Table of Contents

About

This project provides a basic setup for implementing Auth0 authentication in a Flask web application. Auth0 is a powerful authentication and authorization platform that allows you to add authentication features quickly and easily to your web applications.

Features:

  • User authentication using Auth0.
  • Auth0 configuration and management.
  • Sample routes to demonstrate authentication.

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository to your local machine:

    git clone https://github.com/adityak74/auth0-test-project-flask.git
    cd auth0-test-project-flask
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use: venv\Scripts\activate
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Configure Auth0:

    • Create an Auth0 account and set up an application.
    • Update the config.py file with your Auth0 configuration details.
  5. Run the Flask application:

    python app.py
  6. Access the application in your browser at http://localhost:5000.

Usage

The application demonstrates how to protect routes using Auth0 authentication. You can customize and expand it to suit your project's requirements. Refer to the code and the official Auth0 documentation for more information on how to use Auth0 in your Flask application.

Configuration

Make sure to update the config.py file with your Auth0 configuration details. Here's what you need to modify:

AUTH0_DOMAIN = 'your-auth0-domain'
API_AUDIENCE = 'your-api-audience'
ALGORITHMS = ['RS256']

For more details on Auth0 configuration, refer to the official Auth0 documentation.

Contributing

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

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and ensure that tests pass.
  4. Commit your changes and create a clear, concise pull request with a detailed description.
  5. Be open to feedback and make any necessary revisions.

License

This project is licensed under the MIT License.


Feel free to update this README with specific details about your project and its usage as needed. Additionally, consider including information on deployment, troubleshooting, or any other relevant details for users and contributors.