{"id":14989801,"url":"https://github.com/carlagesa/django-auth0-","last_synced_at":"2026-01-04T10:11:58.192Z","repository":{"id":241387943,"uuid":"806650938","full_name":"carlagesa/Django-Auth0-","owner":"carlagesa","description":"This sample demonstrates my ability to add authentication to a Django web app using Auth0 .","archived":false,"fork":false,"pushed_at":"2024-05-28T16:57:59.000Z","size":168,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T07:14:45.841Z","etag":null,"topics":["auth0","auth0-jwt","django-rest-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carlagesa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-27T15:57:22.000Z","updated_at":"2024-05-28T16:58:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a531022-1ddd-472c-9366-5a4e70d1448b","html_url":"https://github.com/carlagesa/Django-Auth0-","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":0.368421052631579,"last_synced_commit":"3f0d991f90094298c6a0624147a36911a3807efa"},"previous_names":["carlagesa/django-auth0-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlagesa%2FDjango-Auth0-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlagesa%2FDjango-Auth0-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlagesa%2FDjango-Auth0-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlagesa%2FDjango-Auth0-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlagesa","download_url":"https://codeload.github.com/carlagesa/Django-Auth0-/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244566945,"owners_count":20473451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth0","auth0-jwt","django-rest-framework"],"created_at":"2024-09-24T14:18:55.978Z","updated_at":"2026-01-04T10:11:58.165Z","avatar_url":"https://github.com/carlagesa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Django Auth0 Integration\n## Introduction\n\u003cimg src=\"https://github.com/carlagesa/Django-Auth0-/blob/main/apiexample/auth0.229x256.png?raw=true\" alt=\"Success!\" width=\"200\"/\u003e\n\nAuth0 is a powerful identity management platform that allows developers to add authentication and authorization services to their applications. This Django project showcases how to implement Auth0 authentication in a Django application, providing users with secure and seamless access.\n\nThis project demonstrates how to integrate Auth0 authentication into a Django application.\n\n\n## API Reference\n#### The routes shown below are available for the following requests:\n#### Available for non-authenticated requests\n\n```http\n  GET /api/public\n```\n\n#### Available for authenticated requests containing an access token with no additional scopes\n\n```http\n  GET /api/private\n```\n#### Available for authenticated requests containing an access token with the read:messages scope granted\n```http\n  GET /api/private-scoped\n```\n\n\n\n# Running the example\n\nIn order to run the example, you need to have `python` and `pip` installed.\n\nYou also need to set your Auth0 Domain and the API's audience as environment variables with the following names\nrespectively: `AUTH0_DOMAIN` and `API_IDENTIFIER`, which is the audience of your API. You can find an example in the\n`env.example` file.\n\nFor that, if you just create a file named `.env` in the directory and set the values like the following,\nthe app will just work:\n\n```bash\n# .env file\nAUTH0_DOMAIN=example.auth0.com\nAPI_IDENTIFIER=YOUR_API_AUDIENCE\n\n```\n\nOnce you've set those 2 environment variables:\n\n1. Install the needed dependencies with `pip install -r requirements.txt`\n2. Migrate the database with `python manage.py migrate`\n3. Start the server with `python manage.py runserver 3010`\n4. Try calling [http://localhost:3010/api/public](http://localhost:3010/api/public)\n\n# Testing the API\n\nYou can then try to do a GET to [http://localhost:3010/api/private](http://localhost:3010/api/private) which will\nthrow an error if you don't send an access token signed with RS256 with the appropriate issuer and audience in the\nAuthorization header. \n\nYou can also try to do a GET to \n[http://localhost:3010/api/private-scoped/](http://localhost:3010/api/private-scoped) which will throw an error if\nyou don't send an access token with the scope `read:messages` signed with RS256 with the appropriate issuer and audience\nin the Authorization header.\n\n    \n## Screenshots\n \u003ch3\u003e This is what will show upon successfull connection\u003c/h3\u003e \u003cbr\u003e\n\u003cimg src=\"https://github.com/carlagesa/Django-Auth0-/blob/main/apiexample/Result.png?raw=true\" alt=\"Success!\" width=\"900\"/\u003e\n\n\u003ch3\u003eThis is what will show upon a failed connection\u003c/h3\u003e\n\u003cimg src=\"https://github.com/carlagesa/Django-Auth0-/blob/main/apiexample/Fail-Result.png?raw=true\" alt=\"Failed connection!\" width=\"900\"/\u003e\n\n## Links\nFor more info check https://auth0.com/docs/quickstart/backend/django\n\n\n## Authors\n\n- [@carlagesa](https://www.github.com/carlagesa)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlagesa%2Fdjango-auth0-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlagesa%2Fdjango-auth0-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlagesa%2Fdjango-auth0-/lists"}