This is a simple Flask application that demonstrates how to integrate Auth0 for authentication in a Python web application.
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.
To get started with this project, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/adityak74/auth0-test-project-flask.git cd auth0-test-project-flask
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure Auth0:
- Create an Auth0 account and set up an application.
- Update the
config.py
file with your Auth0 configuration details.
-
Run the Flask application:
python app.py
-
Access the application in your browser at http://localhost:5000.
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.
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.
Contributions are welcome! If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure that tests pass.
- Commit your changes and create a clear, concise pull request with a detailed description.
- Be open to feedback and make any necessary revisions.
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.