{"id":25524779,"url":"https://github.com/westphahl/hydra-login-consent-python","last_synced_at":"2025-07-23T08:34:07.744Z","repository":{"id":46074863,"uuid":"162012548","full_name":"westphahl/hydra-login-consent-python","owner":"westphahl","description":"Example implementation for the User Login and Consent flow of ORY Hydra version 1.0.x in Python","archived":false,"fork":false,"pushed_at":"2023-02-16T02:07:36.000Z","size":14,"stargazers_count":28,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-05T10:50:34.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/westphahl.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-16T15:06:11.000Z","updated_at":"2025-02-10T10:32:20.000Z","dependencies_parsed_at":"2025-02-19T20:05:55.565Z","dependency_job_id":"1dc363ef-d795-48dc-8730-af519c1ae429","html_url":"https://github.com/westphahl/hydra-login-consent-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/westphahl/hydra-login-consent-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westphahl%2Fhydra-login-consent-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westphahl%2Fhydra-login-consent-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westphahl%2Fhydra-login-consent-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westphahl%2Fhydra-login-consent-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/westphahl","download_url":"https://codeload.github.com/westphahl/hydra-login-consent-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westphahl%2Fhydra-login-consent-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266645154,"owners_count":23961658,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-02-19T20:05:35.055Z","updated_at":"2025-07-23T08:34:07.716Z","avatar_url":"https://github.com/westphahl.png","language":"Python","funding_links":[],"categories":["Archived, Outdated, and WIP"],"sub_categories":["Ory Fosite"],"readme":"Hydra login/consent provider - Python\n======================================\n\nThis is an example implementation for the User Login and Consent flow of \n[ORY Hydra](https://www.ory.sh/docs/hydra/) version 1.7.x in Python.\n\n**Requirements: Python \u003e= 3.7**\n\nThis example is using the official\n[ory-hydra-client](https://github.com/ory/sdk/tree/master/clients/hydra/python) Python library.\n\nRunning locally\n---------------\n\nUse the official Hydra Container image:\n\n```shell\ndocker run \\\n    -it \\\n    --rm \\\n    --network=\"host\" \\\n    -e \"DSN=memory\" \\\n    -e \"URLS_SELF_ISSUER=http://127.0.0.1:4444/\" \\\n    -e \"URLS_CONSENT=http://127.0.0.1:5000/consent\" \\\n    -e \"URLS_LOGIN=http://127.0.0.1:5000/login\" \\\n    -e \"LOG_LEAK_SENSITIVE_VALUES=true\" \\\n    --name hydra \\\n    -p 4445:4445 \\\n    -p 4444:4444 \\\n    oryd/hydra:v1.7 \\\n    serve all --dangerous-force-http\n```\n\nAfterwards you can install the dependencies and run the example application:\n\n\n```shell\n$ pip install -r requirements.txt\n$ flask run\n```\n\n\n## Testing an example flow\n\n```sh\ndocker exec hydra \\\n    hydra clients create \\\n    --endpoint http://127.0.0.1:4445 \\\n    --id auth-code-client \\\n    --secret secret \\\n    --grant-types authorization_code,refresh_token \\\n    --response-types code,id_token \\\n    --scope openid,offline \\\n    --callbacks http://127.0.0.1:5555/callback\n```\n\n```sh\ndocker exec hydra \\\n    hydra token user \\\n    --client-id auth-code-client \\\n    --client-secret secret \\\n    --endpoint http://127.0.0.1:4444/ \\\n    --port 5555 \\\n    --scope openid,offline \\\n    --audience auth-code-client\n```\n\nSee also the instructions in the\n[5 minute tutorial](https://www.ory.sh/docs/hydra/5min-tutorial) for testing\nthe various [OAuth 2.0 grant types](https://oauth.net/2/grant-types/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwestphahl%2Fhydra-login-consent-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwestphahl%2Fhydra-login-consent-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwestphahl%2Fhydra-login-consent-python/lists"}