{"id":18615755,"url":"https://github.com/jan-janssen/pyauthenticator","last_synced_at":"2025-04-11T01:31:31.655Z","repository":{"id":40244654,"uuid":"365509906","full_name":"jan-janssen/pyauthenticator","owner":"jan-janssen","description":"Similar to the Google authenticator just written in Python to automate annoying two factor authentication. ","archived":false,"fork":false,"pushed_at":"2025-04-02T04:11:28.000Z","size":416,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T05:20:21.414Z","etag":null,"topics":["2fa","2fa-client","2fa-client-python","2factor","hotp","hotp-generator","otpauth","totp","totp-generator","two-factor-authentication"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jan-janssen.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":"2021-05-08T12:33:37.000Z","updated_at":"2025-01-04T19:53:34.000Z","dependencies_parsed_at":"2024-04-04T21:48:03.280Z","dependency_job_id":"f909b850-202f-4f63-a38a-494903789c38","html_url":"https://github.com/jan-janssen/pyauthenticator","commit_stats":{"total_commits":91,"total_committers":4,"mean_commits":22.75,"dds":0.5604395604395604,"last_synced_commit":"a3cb6fed7e960c1ebf833bed9c9dd5834f635a5a"},"previous_names":["pyscioffice/pyauthenticator"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-janssen%2Fpyauthenticator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-janssen%2Fpyauthenticator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-janssen%2Fpyauthenticator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-janssen%2Fpyauthenticator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jan-janssen","download_url":"https://codeload.github.com/jan-janssen/pyauthenticator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248325169,"owners_count":21084880,"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":["2fa","2fa-client","2fa-client-python","2factor","hotp","hotp-generator","otpauth","totp","totp-generator","two-factor-authentication"],"created_at":"2024-11-07T03:31:52.951Z","updated_at":"2025-04-11T01:31:26.638Z","avatar_url":"https://github.com/jan-janssen.png","language":"Python","readme":"# pyauthenticator\n[![Python package](https://github.com/jan-janssen/pyauthenticator/actions/workflows/unittest.yml/badge.svg?branch=main)](https://github.com/jan-janssen/pyauthenticator/actions/workflows/unittest.yml)\n[![Coverage Status](https://coveralls.io/repos/github/jan-janssen/pyauthenticator/badge.svg?branch=main)](https://coveralls.io/github/jan-janssen/pyauthenticator?branch=main)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nSimilar to the Google authenticator just written in Python. With more and more services requiring two factor\nauthentication without supporting application specific passwords or other forms of token based authenication\nsuitable for automation this python packages allows to generate two factor authentication codes on the commandline\nor in python.\n\n![Preview of pyauthenticator](https://raw.githubusercontent.com/jan-janssen/pyauthenticator/main/pyauthenticator.gif) \n\n# For Users \n## Installation\nInstall `pyauthenticator` via conda:\n```\n\u003e\u003e\u003e conda install -c conda-forge pyauthenticator\n```\n\nAlternatively, `pyauthenticator` can also be installed via pip:\n```\n\u003e\u003e\u003e pip install pyauthenticator\n```\n\n## Command Line\nGet help how to use `pyauthenticator` using the `--help/-h` option:\n```\n\u003e\u003e\u003e pyauthenticator --help\n\nusage: pyauthenticator [-h] [-qr] [-a ADD] service\n\npositional arguments:\n  service            Service to generate optauth code for. Currently no\n                     service is defined in the ~/.pyauthenticator config file.\n\noptions:\n  -h, --help         show this help message and exit\n  -qr, --qrcode      Generate qrcode as \u003cservice.png\u003e file.\n  -a ADD, --add ADD  Add service by providing the \u003cqrcode.png\u003e file as\n                     additional argument.\n```\n\nAdd `google` as new service after saving the qrcode to `Screenshot 2023-07-02 at 12.45.09.png` to your desktop:\n```\n\u003e\u003e\u003e pyauthenticator google --add ~/Desktop/Screenshot\\ 2023-07-02\\ at\\ 12.45.09.png\n\nThe service 'google' was added, from file \u003c/Users/jan/Desktop/Screenshot 2023-07-02 at 12.45.09.png\u003e\n```\n\nAfterwards, new authentication codes can be generated for the service `google` using:\n```\n\u003e\u003e\u003e pyauthenticator google\n\n087078\n```\nBeyond google, `pyauthenticator` works for any service which implements the two factor authentication. \n\nIf you mistype the name of the service, then `pyauthenticator` suggests alternative options:\n```\n\u003e\u003e\u003e pyauthenticator googel\n\nThe service \"googel\" does not exist.\n\nThe config file ~/.pyauthenticator contains the following services:\n  * google\n\nChoose one of these or add a new service using:\n  pyauthenticator --add \u003cqr-code.png\u003e \u003cservicename\u003e\n```\n\n## Support \nFor any support requests feel free to open an [issue on Github](https://github.com/jan-janssen/pyauthenticator/issues). \n\n# For Developers \n## Python Interface\nThe same functionality which is available on the command line is also available via the python interface:\n```\nfrom pyauthenticator import get_two_factor_code\nget_two_factor_code(service)\n```\nSo `pyauthenticator` can be integrated in existing python packages which need access to resources protected by two \nfactor authentication. \n\n## Configuration\nThe configuration is stored in `~/.pyauthenticator` it is written in the JSON format. For a given service like `github`\nthe config file contains:\n```\n{\"google\": \"otpauth://totp/Google:\u003cusername\u003e?secret=\u003csecret\u003e\u0026issuer=Google\"}\n```\nWith the Google username `\u003cusername\u003e` and the corresponding secret `\u003csecret\u003e` being contained in the QR code.\n\n## License \nThe `pyauthenticator` package is licensed under the [BSD-3-Clause license](https://github.com/jan-janssen/pyauthenticator/blob/main/LICENSE). ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjan-janssen%2Fpyauthenticator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjan-janssen%2Fpyauthenticator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjan-janssen%2Fpyauthenticator/lists"}