{"repo":"Laragear/TwoFactor","free":true,"listed":false,"github":"https://github.com/Laragear/TwoFactor","clone":"git clone https://github.com/Laragear/TwoFactor.git","description":"Two-Factor Authentication for all your users out-of-the-box.","language":"PHP","stars":341,"topics":["laravel","authentication","php","2fa","2factor","two-factor","two-factor-authentication"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Two Factor On-premises Two-Factor Authentication for all your users out of the box. This package enables TOTP authentication using 6 digits codes. No need for external APIs. [!TIP] Want to authenticate users with Passkeys? Check out Laragear WebAuthn. Become a sponsor Your support allows me to keep this package free, up-to-date and maintainable. Alternatively, you can spread the word on social media! Requirements PHP 8.3 or later Laravel 12 or later Installation Fire up Composer and require this package in your project. That's it. How this works This package adds a Contract to detect if a user, after the credentials are deemed valid, should use Two-Factor Authentication as a second layer of authentication. It includes a custom view and a helper to handle the Two-Factor authentication itself during login attempts. Works without middleware or new guards, but you can go full manual if you want. Set up 1. First, install the migration, translations, views and config into your application, with the two-factor:install Artisan command. [!TIP] You can edit the migration by adding new columns before migrating, and also change the table name. After that, you may migrate your table like always through the Artisan command. 2. Add the TwoFactorAuthenticatable contract and the TwoFactorAuthentication trait to the User model, or any other model you want to make Two-Factor Authentication available. [!TIP] The contract is used to identify the model using Two-Factor Authentication, while the tr","default_branch":null,"files":null,"tree":[],"storefront":"/r/Laragear","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Laragear/TwoFactor/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}