{"id":36969808,"url":"https://github.com/ipunkt/laravel-two-factor-authentication","last_synced_at":"2026-01-13T21:39:25.372Z","repository":{"id":56993261,"uuid":"75753592","full_name":"ipunkt/laravel-two-factor-authentication","owner":"ipunkt","description":"Two Factor Authentication for laravel apps","archived":true,"fork":false,"pushed_at":"2017-11-01T12:28:04.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T05:09:27.166Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipunkt.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-12-06T17:13:05.000Z","updated_at":"2023-05-30T09:02:27.000Z","dependencies_parsed_at":"2022-08-21T13:20:27.183Z","dependency_job_id":null,"html_url":"https://github.com/ipunkt/laravel-two-factor-authentication","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ipunkt/laravel-two-factor-authentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-two-factor-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-two-factor-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-two-factor-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-two-factor-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipunkt","download_url":"https://codeload.github.com/ipunkt/laravel-two-factor-authentication/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-two-factor-authentication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: 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":[],"created_at":"2026-01-13T21:39:24.748Z","updated_at":"2026-01-13T21:39:25.367Z","avatar_url":"https://github.com/ipunkt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Two Factor Authentication\n\n[![Total Downloads](https://poser.pugx.org/ipunkt/laravel-two-factor-authentication/d/total.svg)](https://packagist.org/packages/ipunkt/laravel-two-factor-authentication)\n[![Latest Stable Version](https://poser.pugx.org/ipunkt/laravel-two-factor-authentication/v/stable.svg)](https://packagist.org/packages/ipunkt/laravel-two-factor-authentication)\n[![Latest Unstable Version](https://poser.pugx.org/ipunkt/laravel-two-factor-authentication/v/unstable.svg)](https://packagist.org/packages/ipunkt/laravel-two-factor-authentication)\n[![License](https://poser.pugx.org/ipunkt/laravel-two-factor-authentication/license.svg)](https://packagist.org/packages/ipunkt/laravel-two-factor-authentication)\n\n## Introduction\n\nThis package adds 2FA (Two Factor Authentication) to your laravel application.\n\n## Installation\n\nJust install the package by adding to composer requirements\n\n\tcomposer require ipunkt/laravel-two-factor-authentication\n\nand add the Service Provider in your `config/app.php`\n\n\t\\Ipunkt\\Laravel\\TwoFactorAuthentication\\TwoFactorAuthenticationServiceProvider::class,\n\nAfter adding the provider the database migration should run\n\n\tphp artisan migrate\n\n\n## Setup\n\n### User Model Trait\n\nThe package adds a `google2fa_secret` column to your users table. This can be null, but should hold the secret key, being generated with the help of a trait: `Ipunkt\\Laravel\\TwoFactorAuthentication\\TwoFactorSupport`\n\nThis trait has to be added to the authorization based user model class.\n\n### Authentication Controller\n\nThe `Ipunkt\\Laravel\\TwoFactorAuthentication\\AuthenticatesWith2FA` trait overrides the `authenticated` method within the `LoginController`. So please update your LoginController\n\n\tuse App\\Http\\Controllers\\Controller;\n    use Ipunkt\\Laravel\\TwoFactorAuthentication\\AuthenticatesWith2FA;\n    use Illuminate\\Foundation\\Auth\\AuthenticatesUsers;\n\n\tclass LoginController extends Controller\n    {\n    \tuse AuthenticatesUsers,\n                AuthenticatesWith2FA {\n                AuthenticatesWith2FA::authenticated insteadof AuthenticatesUsers;\n            }\n\t\t//...\n\t}\n\nSo we can interact with the user after authenticating with user credentials and display a TOTP field to get the Authenticator App displayed One-Time-Token.\n\n## Customizing Package Content\n\n### Config\n\nYou can change config settings by publishing config file\n\n\t$\u003e php artisan vendor:publish --provider=\"Ipunkt\\Laravel\\TwoFactorAuthentication\\ServiceProvider\" --tag=config\n\nand edit `/config/2fa.php` to suit your needs.\n\n### Views\n\nYou can change delivered views by publishing view files\n\n\t$\u003e php artisan vendor:publish --provider=\"Ipunkt\\Laravel\\TwoFactorAuthentication\\ServiceProvider\" --tag=view\n\nand edit views in `/resources/views/vendor/2fa`.\n\n### Migrations\n\nYou can change the packaged migrations by publishing migrations\n\n\t$\u003e php artisan vendor:publish --provider=\"Ipunkt\\Laravel\\TwoFactorAuthentication\\ServiceProvider\" --tag=migrations\n\nand edit migrations in `/database/migrations`.\n\n## License\n\nTwo Factor Authentication is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipunkt%2Flaravel-two-factor-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipunkt%2Flaravel-two-factor-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipunkt%2Flaravel-two-factor-authentication/lists"}