{"id":13546595,"url":"https://github.com/jeremykenedy/laravel2step","last_synced_at":"2025-04-12T19:42:34.126Z","repository":{"id":52310571,"uuid":"113799854","full_name":"jeremykenedy/laravel2step","owner":"jeremykenedy","description":"Laravel 2-Step verification is a package to add 2-Step user authentication to any Laravel project easily. It is configurable and customizable. It uses notifications to send the user an email with a 4-digit verification code.  Laravel 2-Step Authentication Verification for Laravel. Can be used in out the box with Laravel's authentication scaffolding or integrated into other projects.","archived":false,"fork":false,"pushed_at":"2023-06-08T13:07:40.000Z","size":94,"stargazers_count":270,"open_issues_count":1,"forks_count":49,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-01T23:49:52.256Z","etag":null,"topics":["2-step","2-step-verification","laravel-verification","verification"],"latest_commit_sha":null,"homepage":"","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/jeremykenedy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["jeremykenedy"],"patreon":"jeremykenedy"}},"created_at":"2017-12-11T01:50:06.000Z","updated_at":"2024-03-26T07:13:37.000Z","dependencies_parsed_at":"2023-09-27T03:21:39.157Z","dependency_job_id":null,"html_url":"https://github.com/jeremykenedy/laravel2step","commit_stats":{"total_commits":69,"total_committers":5,"mean_commits":13.8,"dds":0.1159420289855072,"last_synced_commit":"251974cb3bcf3c7b9fc93be5d94d5a1ae7158c2c"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremykenedy%2Flaravel2step","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremykenedy%2Flaravel2step/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremykenedy%2Flaravel2step/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeremykenedy%2Flaravel2step/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeremykenedy","download_url":"https://codeload.github.com/jeremykenedy/laravel2step/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625316,"owners_count":21135511,"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":["2-step","2-step-verification","laravel-verification","verification"],"created_at":"2024-08-01T12:00:40.715Z","updated_at":"2025-04-12T19:42:34.096Z","avatar_url":"https://github.com/jeremykenedy.png","language":"PHP","funding_links":["https://github.com/sponsors/jeremykenedy","https://patreon.com/jeremykenedy"],"categories":["PHP","Laravel-Auth"],"sub_categories":["Environment File"],"readme":"![Laravel 2 Step Verification](https://github-project-images.s3-us-west-2.amazonaws.com/logos/laravel2step-logo.png)\n\n# Laravel 2 Step Verification\nLaravel 2-Step Verification is a package to add 2-Step user authentication to any Laravel project easily. It is configurable and customizable. It uses notifications to send the user an email with a 4-digit verification code. Can be used in out the box with Laravel's authentication scaffolding or integrated into other projects.\n\n[![Travis-CI Build](https://travis-ci.org/jeremykenedy/laravel2step.svg?branch=master)](https://travis-ci.org/jeremykenedy/laravel2step)\n[![Latest Stable Version](https://poser.pugx.org/jeremykenedy/laravel2step/v/stable)](https://packagist.org/packages/jeremykenedy/laravel2step)\n[![Total Downloads](https://poser.pugx.org/jeremykenedy/laravel2step/downloads)](https://packagist.org/packages/jeremykenedy/laravel2step)\n[![StyleCI](https://github.styleci.io/repos/113799854/shield?branch=master)](https://github.styleci.io/repos/113799854)\n[![Build Status](https://scrutinizer-ci.com/g/jeremykenedy/laravel2step/badges/build.png?b=master)](https://scrutinizer-ci.com/g/jeremykenedy/laravel2step/build-status/master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jeremykenedy/laravel2step/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jeremykenedy/laravel2step/?branch=master)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/jeremykenedy/laravel2step/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)\n[![MadeWithLaravel.com shield](https://madewithlaravel.com/storage/repo-shields/1372-shield.svg)](https://madewithlaravel.com/p/laravel-2-step-verification/shield-link)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nTable of contents:\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation Instructions](#installation-instructions)\n- [Configuration](#configuration)\n    - [Environment File](#environment-file)\n- [Usage](#usage)\n- [Routes](#routes)\n- [Screenshots](#screenshots)\n- [File Tree](#file-tree)\n- [Future](#future)\n- [Opening an Issue](#opening-an-issue)\n- [License](#license)\n\n### Features\n\n| Laravel 2 Step Verification Features |\n| :------------ |\n| Uses [Notification](https://laravel.com/docs/5.5/notifications) Class to send user code to users email |\n| Can publish customizable views and assets |\n| Lots of [configuration](#configuration) options |\n| Uses Language [localization](https://laravel.com/docs/5.5/localization) files |\n| Verificaton Page |\n| Locked Page |\n\n### Requirements\n* [Laravel 5.3, 5.4, 5.5+ ,6+, 7+, 8+, 9+, 10+, and 11+](https://laravel.com/docs/installation)\n\n### Installation Instructions\n1. From your projects root folder in terminal run:\n\n    Laravel 6+ use:\n\n    ```bash\n        composer require jeremykenedy/laravel2step\n    ```\n\n    Laravel 5.8 use:\n    ```bash\n        composer require jeremykenedy/laravel2step:v1.4.0\n    ```\n\n    Laravel 5.7 and below use:\n\n    ```\n        composer require jeremykenedy/laravel2step:v1.0.2\n    ```\n\n2. Register the package\n\n* Laravel 5.5 and up\nUses package auto discovery feature, no need to edit the `config/app.php` file.\n\n* Laravel 5.4 and below\nRegister the package with laravel in `config/app.php` under `providers` with the following:\n\n```php\n    'providers' =\u003e [\n        jeremykenedy\\laravel2step\\laravel2stepServiceProvider::class,\n    ];\n```\n\n3. Publish the packages views, config file, assets, and language files by running the following from your projects root folder:\n\n```bash\n    php artisan vendor:publish --tag=laravel2step\n```\n\n4. Optionally Update your `.env` file and associated settings (see [Environment File](#environment-file) section)\n\n5. Run the migration to add the verifications codes table:\n\n```php\n    php artisan migrate\n```\n\n* Note: If you want to specify a different table or connection make sure you update your `.env` file with the needed configuration variables.\n\n6. Make sure your apps email is configured - this is usually done by configuring the Laravel out the box settings in the `.env` file.\n\n### Configuration\nLaravel 2-Step Verification can be configured in directly in `/config/laravel2step.php` or in the variables in your `.env` file.\n\n##### Environment File\nHere are the `.env` file variables available:\n\n```bash\nLARAVEL_2STEP_ENABLED=true\nLARAVEL_2STEP_DATABASE_CONNECTION=mysql\nLARAVEL_2STEP_DATABASE_TABLE=laravel2step\nLARAVEL_2STEP_USER_MODEL=App\\User\nLARAVEL_2STEP_EMAIL_FROM=\"anEmailIsrequired@email.com\"\nLARAVEL_2STEP_EMAIL_FROM_NAME=\"Laravel 2 Step Verification\"\nLARAVEL_2STEP_EMAIL_SUBJECT='Laravel 2 Step Verification'\nLARAVEL_2STEP_EXCEEDED_COUNT=3\nLARAVEL_2STEP_EXCEEDED_COUNTDOWN_MINUTES=1440\nLARAVEL_2STEP_VERIFIED_LIFETIME_MINUTES=360\nLARAVEL_2STEP_RESET_BUFFER_IN_SECONDS=300\nLARAVEL_2STEP_CSS_FILE=\"css/laravel2step/app.css\"\nLARAVEL_2STEP_APP_CSS_ENABLED=false\nLARAVEL_2STEP_APP_CSS=\"css/app.css\"\nLARAVEL_2STEP_BOOTSTRAP_CSS_CDN_ENABLED=true\nLARAVEL_2STEP_BOOTSTRAP_CSS_CDN=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\"\n```\n\n### Usage\nLaravel 2-Step Verification is enabled via middleware.\nYou can enable 2-Step Verification in your routes and controllers via the following middleware:\n\n```php\ntwostep\n```\n\nExample to start recording page views using middlware in `web.php`:\n\n```php\nRoute::group(['middleware' =\u003e ['twostep']], function () {\n    Route::get('/home', 'HomeController@index')-\u003ename('home');\n});\n```\n\n### Routes\n* ```/verification/needed```\n* ```/verification/verify```\n* ```/verification/resend```\n\n### Screenshots\n![Verification Page](https://s3-us-west-2.amazonaws.com/github-project-images/laravel2step/1-verification-page.jpeg)\n![Resent Email Modal](https://s3-us-west-2.amazonaws.com/github-project-images/laravel2step/2-verification-email-resent.jpeg)\n![Lock Warning Modal](https://s3-us-west-2.amazonaws.com/github-project-images/laravel2step/3-lock-warning.jpeg)\n![Locked Page](https://s3-us-west-2.amazonaws.com/github-project-images/laravel2step/4-lock-screen.jpeg)\n![Verification Email](https://s3-us-west-2.amazonaws.com/github-project-images/laravel2step/5-verification-email.jpeg)\n\n### File Tree\n\n```\n└── laravel2step\n    ├── .gitignore\n    ├── LICENSE\n    ├── README.md\n    ├── composer.json\n    └── src\n        ├── .env.example\n        ├── Laravel2stepServiceProvider.php\n        ├── app\n        │   ├── Http\n        │   │   ├── Controllers\n        │   │   │   └── TwoStepController.php\n        │   │   └── Middleware\n        │   │       └── Laravel2step.php\n        │   ├── Models\n        │   │   └── TwoStepAuth.php\n        │   ├── Notifications\n        │   │   └── SendVerificationCodeEmail.php\n        │   └── Traits\n        │       └── Laravel2StepTrait.php\n        ├── config\n        │   └── laravel2step.php\n        ├── database\n        │   └── migrations\n        │       └── 2017_12_09_070937_create_two_step_auth_table.php\n        ├── public\n        │   └── css\n        │       ├── app.css\n        │       └── app.min.css\n        ├── resources\n        │   ├── assets\n        │   │   └── scss\n        │   │       ├── _animations.scss\n        │   │       ├── _mixins.scss\n        │   │       ├── _modals.scss\n        │   │       ├── _variables.scss\n        │   │       ├── _verification.scss\n        │   │       └── app.scss\n        │   ├── lang\n        │   │   └── en\n        │   │       └── laravel-verification.php\n        │   └── views\n        │       ├── layouts\n        │       │   └── app.blade.php\n        │       ├── partials\n        │       ├── scripts\n        │       │   └── input-parsing-auto-stepper.blade.php\n        │       └── twostep\n        │           ├── exceeded.blade.php\n        │           └── verification.blade.php\n        └── routes\n            └── web.php\n\n```\n\n* Tree command can be installed using brew: `brew install tree`\n* File tree generated using command `tree -a -I '.git|node_modules|vendor|storage|tests`\n\n### Future\n* Unit Tests\n* Travis-CI Integration.\n* Its own HTML email template.\n* Add in additional notifications for SMS or ???.\n* Add in capture IP Address.\n* Change to incremental tables and logic accordingly\n    * Create Artisan command and job to prune said entries.\n\n### Opening an Issue\nBefore opening an issue there are a couple of considerations:\n* You are all awesome!\n* **Read the instructions** and make sure all steps were *followed correctly*.\n* **Check** that the issue is not *specific to your development environment* setup.\n* **Provide** *duplication steps*.\n* **Attempt to look into the issue**, and if you *have a solution, make a pull request*.\n* **Show that you have made an attempt** to *look into the issue*.\n* **Check** to see if the issue you are *reporting is a duplicate* of a previous reported issue.\n* **Following these instructions show me that you have tried.**\n* If you have a questions send me an email to jeremykenedy@gmail.com\n* Need some help, I can do my best on Slack: https://opensourcehelpgroup.slack.com\n* Please be considerate that this is an open source project that I provide to the community for FREE when openeing an issue.\n\nOpen source projects are a the community’s responsibility to use, contribute, and debug.\n\n### License\nLaravel 2-Step Verification is licensed under the MIT license. Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremykenedy%2Flaravel2step","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeremykenedy%2Flaravel2step","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeremykenedy%2Flaravel2step/lists"}