{"id":28203522,"url":"https://github.com/modernmcguire/drawbridge","last_synced_at":"2026-04-27T08:32:13.472Z","repository":{"id":226086985,"uuid":"767187450","full_name":"modernmcguire/drawbridge","owner":"modernmcguire","description":"Add 2FA support to your Laravel Application","archived":false,"fork":false,"pushed_at":"2024-07-08T04:12:07.000Z","size":46,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T13:11:39.582Z","etag":null,"topics":["authentication","email","laravel","magic-links","two-factor-authentication"],"latest_commit_sha":null,"homepage":"https://modernmcguire.com","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/modernmcguire.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":"Modern McGuire"}},"created_at":"2024-03-04T21:18:33.000Z","updated_at":"2024-03-08T18:56:19.000Z","dependencies_parsed_at":"2024-03-08T20:35:24.647Z","dependency_job_id":"7f75e886-e698-484b-aca8-feb4fd6c769f","html_url":"https://github.com/modernmcguire/drawbridge","commit_stats":null,"previous_names":["modernmcguire/laravel-otp","modernmcguire/drawbridge"],"tags_count":5,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/modernmcguire/drawbridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernmcguire%2Fdrawbridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernmcguire%2Fdrawbridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernmcguire%2Fdrawbridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernmcguire%2Fdrawbridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modernmcguire","download_url":"https://codeload.github.com/modernmcguire/drawbridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernmcguire%2Fdrawbridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["authentication","email","laravel","magic-links","two-factor-authentication"],"created_at":"2025-05-17T02:09:37.371Z","updated_at":"2026-04-27T08:32:13.444Z","avatar_url":"https://github.com/modernmcguire.png","language":"PHP","funding_links":["https://github.com/sponsors/Modern McGuire"],"categories":[],"sub_categories":[],"readme":"# Driver-based 2FA for Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/modernmcguire/drawbridge.svg?style=flat-square)](https://packagist.org/packages/modernmcguire/drawbridge)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/modernmcguire/drawbridge/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/modernmcguire/drawbridge/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/modernmcguire/drawbridge/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/modernmcguire/drawbridge/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/modernmcguire/drawbridge.svg?style=flat-square)](https://packagist.org/packages/modernmcguire/drawbridge)\n\nAdd 2FA support to your Laravel Application!\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require modernmcguire/drawbridge\n```\n\nYou can publish and run the migrations with:\n\n```bash\nphp artisan vendor:publish --tag=\"drawbridge-migrations\"\nphp artisan migrate\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"drawbridge-config\"\n```\n\nOptionally, you can publish the login and email using\n\n```bash\nphp artisan vendor:publish --tag=\"drawbridge-views\"\n```\n\n## Config\n\nThe package has multiple drivers to choose from. You can set the driver in the config file or your env.\n\n```php\n'default_driver' =\u003e env('OTP_DRIVER', 'email'),\n```\n\n\u003e Note: Currently the only one that is setup is the email driver.\n\n## Usage\n\n1. Run Migrations\n2. Apply the `HandlesOTP` trait to your User model\n3. Set `two_factor_enabled` to true on the user\n4. Login!\n\nYou will be redirected to a page to enter your OTP code.\n\n## Database\n\nNew database fields will be added to your `users` table.\n\n\n| Field                 | Description                            |\n|-----------------------|----------------------------------------|\n| two_factor_enabled    | Whether two-factor authentication is enabled |\n| otp_secret            | The OTP code to match against           |\n| otp_secret_expires_at | The time the OTP code expires (default: 5 minutes) |\n\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Ben Miller](https://github.com/modernben)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernmcguire%2Fdrawbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodernmcguire%2Fdrawbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernmcguire%2Fdrawbridge/lists"}