{"id":16031773,"url":"https://github.com/realorangeone/django-management-auth","last_synced_at":"2026-04-17T13:33:16.095Z","repository":{"id":206535719,"uuid":"697385762","full_name":"RealOrangeOne/django-management-auth","owner":"RealOrangeOne","description":"Login to a Django application from a management command","archived":false,"fork":false,"pushed_at":"2023-12-06T13:56:30.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-16T10:25:43.842Z","etag":null,"topics":["authentication","django","security"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/django-management-auth/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RealOrangeOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"RealOrangeOne","ko_fi":"theorangeone","liberapay":"theorangeone","custom":["https://theorangeone.net/support/"]}},"created_at":"2023-09-27T16:11:03.000Z","updated_at":"2023-12-07T16:04:58.000Z","dependencies_parsed_at":"2024-12-18T10:11:51.702Z","dependency_job_id":"5c605155-badb-4523-bb1d-0fff7b1f7312","html_url":"https://github.com/RealOrangeOne/django-management-auth","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"bcfa9984b30a962e4d68e86673bba4feedec5879"},"previous_names":["realorangeone/django-management-auth"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/RealOrangeOne/django-management-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-management-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-management-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-management-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-management-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RealOrangeOne","download_url":"https://codeload.github.com/RealOrangeOne/django-management-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealOrangeOne%2Fdjango-management-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31931482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["authentication","django","security"],"created_at":"2024-10-08T21:05:33.217Z","updated_at":"2026-04-17T13:33:16.078Z","avatar_url":"https://github.com/RealOrangeOne.png","language":"Python","funding_links":["https://github.com/sponsors/RealOrangeOne","https://ko-fi.com/theorangeone","https://liberapay.com/theorangeone","https://theorangeone.net/support/"],"categories":[],"sub_categories":[],"readme":"# Django management auth\n\n![CI](https://github.com/RealOrangeOne/django-management-auth/workflows/CI/badge.svg)\n![PyPI](https://img.shields.io/pypi/v/django-management-auth.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-management-auth.svg)\n![PyPI - License](https://img.shields.io/pypi/l/django-management-auth.svg)\n\nLogin to a Django application from a management command.\n\n## Installation\n\n```\npip install django-management-auth\n```\n\nThen, add `management_auth` to `INSTALLED_APPS`.\n\nFinally, add the required URLs:\n\n```python\n# urls.py\n\nurlpatterns += [path(\".login-as\", include(\"management_auth.urls\"))]\n```\n\n## Usage\n\nAuthentication happens using a short-lived signed URL, generated from a management command.\n\n```\n./manage.py login_as \u003cusername\u003e\n```\n\nThis will create a URL for `\u003cusername\u003e`. By default, the URLs are valid for 60 seconds (configurable with `--timeout`).\n\n### Fully-qualified URLs\n\nWhere possible, URLs, are displayed fully-qualified, such that they can be quickly clicked to log in.\n\n- To specify manually, use `MANAGEMENT_AUTH_BASE_URL`\n- For Wagtail users, `WAGTAILADMIN_BASE_URL` is used to create the URL.\n- For `django.contrib.sites` users, `SITE_ID` is correctly considered\n\nIf no base URL is found, a relative path is shown.\n\n## Design considerations\n\n- Tokens are only valid for a short amount of time, intended to prevent reuse / sharing.\n- Tokens are signed URLs, rather than requiring a database table. This means the validation view is faster and more lightweight, and a database leak doesn't risk exposing sessions.\n- Because tokens are signed, they can be used multiple times (however this is a bad idea)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealorangeone%2Fdjango-management-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealorangeone%2Fdjango-management-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealorangeone%2Fdjango-management-auth/lists"}