{"id":15486880,"url":"https://github.com/codenoid/elixir-two-factor-auth","last_synced_at":"2025-09-15T03:18:38.424Z","repository":{"id":62429023,"uuid":"185280359","full_name":"codenoid/elixir-two-factor-auth","owner":"codenoid","description":"Library for generating QR-Code, Random Secret and Verify Time Based Password","archived":false,"fork":false,"pushed_at":"2020-09-20T17:26:54.000Z","size":8,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-01T03:00:00.291Z","etag":null,"topics":["2fa-security","password","security","two-factor-authentication"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/codenoid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-06T22:25:59.000Z","updated_at":"2020-09-20T17:26:56.000Z","dependencies_parsed_at":"2022-11-01T20:01:13.332Z","dependency_job_id":null,"html_url":"https://github.com/codenoid/elixir-two-factor-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codenoid/elixir-two-factor-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Felixir-two-factor-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Felixir-two-factor-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Felixir-two-factor-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Felixir-two-factor-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenoid","download_url":"https://codeload.github.com/codenoid/elixir-two-factor-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2Felixir-two-factor-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273812434,"owners_count":25172878,"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-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["2fa-security","password","security","two-factor-authentication"],"created_at":"2024-10-02T06:20:18.458Z","updated_at":"2025-09-15T03:18:38.373Z","avatar_url":"https://github.com/codenoid.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":":bangbang: | This library is insecure and barery maintained, we suggest you to use [https://github.com/dashbitco/nimble_totp](https://github.com/dashbitco/nimble_totp)\n:---: | :---\n\n# Elixir2fa\n\nLibrary for generating QR-Code, Random Secret and Verify Time Based Password\n\n## Installation\n\nThis package can be installed by adding `elixir2fa` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:elixir2fa, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Usage\n\n```\niex\u003e secret = Elixir2fa.random_secret(16)     \n\"HpJBFRtHjgIQJWIB\"\niex\u003e Elixir2fa.generate_qr(\"account_name\", secret)\n\"https://chart.googleapis.com/chart?chs=200x200\u0026cht=qr\u0026chl=200x200\u0026chld=M|0\u0026cht=qr\u0026chl=otpauth://totp/account_name?secret=HpJBFRtHjgIQJWIB\" # scan via Google Authenticator, Authy, etc\niex\u003e Elixir2fa.generate_totp(secret)              \n\"573671\" # compare with user token\n```\n\nSome source code taken from : \n\n* https://github.com/codenoid/elixir-two-factor-auth\n* https://gist.github.com/ahmadshah/8d978bbc550128cca12dd917a09ddfb7\n* https://github.com/SushiChain/crystal-two-factor-auth/blob/master/src/crystal-two-factor-auth.cr\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/elixir2fa](https://hexdocs.pm/elixir2fa).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenoid%2Felixir-two-factor-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenoid%2Felixir-two-factor-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenoid%2Felixir-two-factor-auth/lists"}