{"id":17241770,"url":"https://github.com/j256/perl-two-factor-auth","last_synced_at":"2025-04-14T03:14:45.445Z","repository":{"id":33507358,"uuid":"37153326","full_name":"j256/perl-two-factor-auth","owner":"j256","description":"Two Factor Authentication Perl code","archived":false,"fork":false,"pushed_at":"2017-07-05T23:27:33.000Z","size":5,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T03:14:33.409Z","etag":null,"topics":["perl","totp"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j256.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":"2015-06-09T19:25:19.000Z","updated_at":"2024-02-25T21:38:44.000Z","dependencies_parsed_at":"2022-08-24T14:23:29.270Z","dependency_job_id":null,"html_url":"https://github.com/j256/perl-two-factor-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Fperl-two-factor-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Fperl-two-factor-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Fperl-two-factor-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Fperl-two-factor-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j256","download_url":"https://codeload.github.com/j256/perl-two-factor-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813803,"owners_count":21165634,"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":["perl","totp"],"created_at":"2024-10-15T06:11:12.675Z","updated_at":"2025-04-14T03:14:45.425Z","avatar_url":"https://github.com/j256.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"2 Factor Authentication (2FA) Perl code which used the Time-based One-time Password\nAlgorithm (TOTP) algorithm.  You can use this code with the Google Authenticator\nmobile app or the Authy mobile or browser app.\n\nSee: http://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm\n\nTo get this to work you:\n\n 1. Properly seed the random number generator.\n 2. Use generateBase32Secret(...) to generate a secret key for a user.\n 3. Store the secret key in the database associated with the user account.\n 4. Display the QR image URL returned by qrImageUrl(...) to the user.\n 5. User uses the image to load the secret key into his authenticator application.\n\nWhenever the user logs in:\n\n1. The user enters the number from the authenticator application into the login form.\n2. Server looks up the secret associated with the user in the database.\n3. The server compares the user input with the output from generateCurrentNumber(...).\n4. If they are equal then the user is allowed to log in.\n\nThanks to Vijay Boyapati @ stackoverflow for initial code.\n\nhttp://stackoverflow.com/questions/25534193/google-authenticator-implementation-in-perl\n\nNOTE: this script depends on Digest::HMAC_SHA1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj256%2Fperl-two-factor-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj256%2Fperl-two-factor-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj256%2Fperl-two-factor-auth/lists"}