This sample demonstrates how to add authentication to a Django web app using Auth0.
Check the Django Quickstart to better understand this sample.
To run the application:
- Make sure you have
python3,pipinstalled. - Rename
.env.exampleto.envand populate it with the client ID, domain, secret. - Register
http://localhost:3000/callbackasAllowed Callback URLsandhttp://localhost:3000asAllowed Logout URLsin your app settings.
Once you've set those variables:
- Install the needed dependencies with
pip install -r requirements.txt - Run
python3 manage.py migrateto migrate the database schema - Run
python3 manage.py runserver 3000to run the server.
The app will be served at http://localhost:3000/.
To run the sample with docker:
- Rename the
.env.examplefile to.env, change the environment variables, and register the URLs as explained previously. - Run
sh exec.shto build and run the docker image in Linux or run.\exec.ps1to build and run the docker image on Windows.
The app will be served at http://localhost:3000/.
Auth0 helps you to:
- Add authentication with multiple authentication sources, either social like Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, among others, or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider.
- Add authentication through more traditional username/password databases.
- Add support for linking different user accounts with the same user.
- Support for generating signed JSON Web Tokens to call your APIs and flow the user identity securely.
- Analytics of how, when and where users are logging in.
- Pull data from other sources and add it to the user profile, through JavaScript rules.
- Go to Auth0 and click Sign Up.
- Use Google, GitHub or Microsoft Account to login.
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
This project is licensed under the MIT license. See the LICENSE file for more info.