{"id":19099657,"url":"https://github.com/kdcllc/tokenflow","last_synced_at":"2026-03-09T02:33:32.704Z","repository":{"id":242611439,"uuid":"809998159","full_name":"kdcllc/tokenflow","owner":"kdcllc","description":" Effortlessly capture and manage access tokens with Azure Device Code integration. Simplify authentication workflows in Python with TokenFlow's seamless and secure token handling. Ideal for developers seeking streamlined, scalable access token solutions.","archived":false,"fork":false,"pushed_at":"2024-07-18T22:04:30.000Z","size":167,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-15T17:01:31.793Z","etag":null,"topics":["access-tokens","authentication","authentication-workflows","azure-device-code","identity-and-access-management","oauth2","token-capture","token-management","tokenflow"],"latest_commit_sha":null,"homepage":"","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/kdcllc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["kdcllc"],"custom":["https://www.buymeacoffee.com/vyve0og"]}},"created_at":"2024-06-03T21:21:34.000Z","updated_at":"2025-05-14T00:36:40.000Z","dependencies_parsed_at":"2024-07-19T03:08:52.393Z","dependency_job_id":null,"html_url":"https://github.com/kdcllc/tokenflow","commit_stats":null,"previous_names":["kdcllc/tenanttokenflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kdcllc/tokenflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2Ftokenflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2Ftokenflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2Ftokenflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2Ftokenflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kdcllc","download_url":"https://codeload.github.com/kdcllc/tokenflow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2Ftokenflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30280895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:23:26.802Z","status":"ssl_error","status_checked_at":"2026-03-09T02:22:46.175Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["access-tokens","authentication","authentication-workflows","azure-device-code","identity-and-access-management","oauth2","token-capture","token-management","tokenflow"],"created_at":"2024-11-09T03:52:08.060Z","updated_at":"2026-03-09T02:33:32.681Z","avatar_url":"https://github.com/kdcllc.png","language":"Python","funding_links":["https://github.com/sponsors/kdcllc","https://www.buymeacoffee.com/vyve0og"],"categories":["others"],"sub_categories":[],"readme":"# TokenFlow\n\n[![GitHub](https://img.shields.io/github/license/kdcllc/tokenflow.svg)](https://github.com/kdcllc/tokenflow/blob/master/LICENSE)\n![Python](https://img.shields.io/badge/python-3.12-blue.svg)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.111.0-009688.svg?style=flat\u0026logo=FastAPI\u0026logoColor=white)](https://fastapi.tiangolo.com)\n[![GitHub stars](https://img.shields.io/github/stars/kdcllc/tokenflow.svg?style=social)](https://github.com/kdcllc/tokenflow/stargazers)\n\n![I stand with Israel](./images/IStandWithIsrael.png)\n\nTokenFlow optimizes token generation and directory management across multiple tenants using Azure device flow. This repository empowers applications to capture user tokens seamlessly and utilize them for creating app registrations, users, and groups within accessible directories. Unlock the potential of multi-tenant applications with TokenFlow.\n\n![azcli container](images/azcli-api-container.png)\n\nThis is a straightforward setup for managing Azure resources using containerized applications and Blob Storage, coupled with an automated user login process via Azure Device Code.\n\nSetup Overview\n- **Azure Container App**: Acts as the host for TokenFlow Api Docker image.\n- **Azure Blob Storage**: Manages state data related to Azure Command Line Interface (CLI) operations.\n\nLogin Flow\n1. Prompt user authentication using Azure Device Code.\n2. Upon successful login, retrieve access token for resource management from the provided endpoint.\n\n## Hire me\n\nPlease send [email](mailto:kingdavidconsulting@gmail.com) if you consider to **hire me**.\n\n[![buymeacoffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/vyve0og)\n\n## Give a Star! :star\n\nIf you like or are using this project to learn or start your solution, please give it a star. Thanks!\n\n## Running Locally\n\nTo run the application locally, follow these steps:\n\n1. **Create a virtual environment:**\n\n    ```bash\n    python -m venv .venv\n    ```\n\n2. **Activate the virtual environment:**\n\n    ```bash\n    source .venv/bin/activate\n    ```\n\n3. **Install the dependencies management tool:**\n\n    ```bash\n    pip install pip-tools\n    ```\n\n4. **Compile the requirements:**\n\n    ```bash\n    pip-compile requirements.in\n    pip-compile requirements.dev.in\n    ```\n\n5. **Install the dependencies:**\n\n    ```bash\n    pip install -r requirements.txt\n    pip install -r requirements.dev.txt\n    ```\n\n6. **Run the application:**\n\n    ```bash\n    #only on WSL\n    export X_AUTH_TOKEN=169ddeb1-502a-42cf-a222-9dbb8ec2cbf6\n    uvicorn src.api:app --reload --port 6700\n    ```\n\n## Deploy the Container\n\nTo deploy the application using Docker, use the following steps:\n\n1. **Pull the Docker container:**\n\n    ```bash\n    docker pull kdcllc/tokenflow\n    ```\n\n2. **Run the Docker container:**\n\n    ```bash\n    docker run -e LOGGING_LEVEL=INFO -e X_AUTH_TOKEN=\u003cyour_auth_token\u003e -p 6700:6700 kdcllc/tokenflow\n    ```\n\n## Tests\n\n```bash\n     pytest tests/test_main.py\n     pytest tests/test_authenticator.py\n\n     # runs all tests\n     python -m pytest\n```\n\n## API Documentation\n\nSwagger documentation is available at [http://localhost:6700/docs](http://localhost:6700/docs).\n\n## Environment Variables\n\n- `LOGGING_LEVEL`: Sets the logging level (default is `INFO`).\n- `X_AUTH_TOKEN`: Your authentication token for accessing the application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdcllc%2Ftokenflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkdcllc%2Ftokenflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdcllc%2Ftokenflow/lists"}