{"id":13828272,"url":"https://github.com/paragonie/multi_factor","last_synced_at":"2025-04-05T05:09:29.758Z","repository":{"id":56001465,"uuid":"61001463","full_name":"paragonie/multi_factor","owner":"paragonie","description":"Vendor-Agnostic Two-Factor Authentication","archived":false,"fork":false,"pushed_at":"2023-01-02T23:03:57.000Z","size":57,"stargazers_count":141,"open_issues_count":8,"forks_count":20,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-29T04:11:23.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paragonie.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}},"created_at":"2016-06-13T02:32:08.000Z","updated_at":"2025-02-11T21:32:39.000Z","dependencies_parsed_at":"2022-08-15T11:10:29.660Z","dependency_job_id":null,"html_url":"https://github.com/paragonie/multi_factor","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fmulti_factor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fmulti_factor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fmulti_factor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fmulti_factor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paragonie","download_url":"https://codeload.github.com/paragonie/multi_factor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289429,"owners_count":20914464,"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":[],"created_at":"2024-08-04T09:02:39.292Z","updated_at":"2025-04-05T05:09:29.743Z","avatar_url":"https://github.com/paragonie.png","language":"PHP","readme":"# Multi-Factor\n\nDesigned to be a vendor-agnostic implementation of various Two-Factor \nAuthentication solutions.\n\nDeveloped by [Paragon Initiative Enterprises](https://paragonie.com) for use\nin our own projects. It's released under a dual license: GPL and MIT. As with\nall dual-licensed projects, feel free to choose the license that fits your\nneeds.\n\n## Requirements\n\n* PHP 7.2+\n  * As per [Paragon Initiative Enterprise's commitment to open source](https://paragonie.com/blog/2016/04/go-php-7-our-commitment-maintaining-our-open-source-projects),\n    all new software will no longer be written for PHP 5.\n\n## Installing\n\n```sh\ncomposer require paragonie/multi-factor\n```\n\n## Example Usage\n\n```php\n\u003c?php\nuse ParagonIE\\MultiFactor\\OneTime;\nuse ParagonIE\\MultiFactor\\OTP\\TOTP;\n\n$seed = random_bytes(20);\n\n// You can use TOTP or HOTP\n$otp = new OneTime($seed, new TOTP());\n\nif (\\password_verify($_POST['password'], $storedHash)) {\n    if ($otp-\u003evalidateCode($_POST['2facode'], time())) {\n        // Login successful    \n    }\n}\n```\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparagonie%2Fmulti_factor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparagonie%2Fmulti_factor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparagonie%2Fmulti_factor/lists"}