{"id":20612934,"url":"https://github.com/ntavelis/auth-email","last_synced_at":"2025-10-15T21:20:09.465Z","repository":{"id":57029067,"uuid":"81019220","full_name":"ntavelis/auth-email","owner":"ntavelis","description":"Generates Email Authentication in Laravel \u003e= 5.4 on top of artisan's make:auth command.","archived":false,"fork":false,"pushed_at":"2018-02-10T15:43:23.000Z","size":66,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T07:10:03.842Z","etag":null,"topics":["artisan","authentication","cli","email","laravel","laravel-5-package"],"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/ntavelis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-05T20:17:18.000Z","updated_at":"2020-06-26T13:26:27.000Z","dependencies_parsed_at":"2022-08-23T16:20:39.865Z","dependency_job_id":null,"html_url":"https://github.com/ntavelis/auth-email","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntavelis%2Fauth-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntavelis%2Fauth-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntavelis%2Fauth-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntavelis%2Fauth-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntavelis","download_url":"https://codeload.github.com/ntavelis/auth-email/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023725,"owners_count":21199960,"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":["artisan","authentication","cli","email","laravel","laravel-5-package"],"created_at":"2024-11-16T11:08:24.229Z","updated_at":"2025-10-15T21:20:04.429Z","avatar_url":"https://github.com/ntavelis.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel auth-email\n\n[![Latest Stable Version](https://poser.pugx.org/ntavelis/auth-email/v/stable)](https://packagist.org/packages/ntavelis/auth-email)\n[![License](https://poser.pugx.org/ntavelis/auth-email/license)](https://packagist.org/packages/ntavelis/auth-email)\n\n\nAuth-email provides out of the box email authentication for your Laravel \u003e=5.4 application. It leverages the Laravel's functionality provided by the `make:auth` command, which runs for you and then proceeds to configure email authentication.\nWhich means that every user that registers to your application, will receive an email with an activate account button. He will have to click the activate account, in order to prove that he is the owner of the email and therefore activate his account.\n\n\n## Installation\n\nVia Composer\n\n``` bash\n$ composer require ntavelis/auth-email\n```\nThen add the service provider in `config/app.php`:\n\nNote: Starting with Laravel 5.5 this package gets auto discovered so you can skip this step!\n```php\n'providers' =\u003e [\n    Ntavelis\\AuthEmail\\AuthEmailServiceProvider::class,\n];\n```\n\nRun your new command:\n\n``` bash\n$ php artisan auth:email\n```\nFinally run your migrations. Now you have email Authentication. Visit `/register` to register a new user via email.\n\nNote: Make sure you configured your email settings properly.\n\n## Options/Parameters\n\nAuth-email provides the following options:\n\nIf you have already bootstrapped your application with `make:auth` before you discovered this package, then you can pass the `-o`, `--only` flag, to make auth-email skip running `make:auth` command.\n\n``` bash\n$ php artisan auth:email -o\n```\n\nAuth-email can run your migrations after setup, to keep installation process as minimum as possible. Pass it the `-m`, `--migrate` flag.\n\n``` bash\n$ php artisan auth:email -m\n```\nNote: Make sure you configured your database settings properly before running the command.\n\nAuth-email can make your generated `app/mail/ActivateAccount.php` implement the ShouldQueue interface. Pass it the `-s`, `--queue` flag.\n\n``` bash\n$ php artisan auth:email -s\n```\nNote: Make sure you configured your queue driver properly.\n\nYou can also run the command with any number of flags.\n\n``` bash\n$ php artisan auth:email -o -m -s\n```\n## Migrations\nAfter the initial installation, you need to run your migrations, auth-email added 2 migration files on your `database/migrations/` path.\nWhich provide 1 new table to store activation tokens and 1 new column in the user table, create_users_table migration is provided by default in laravel, we just add 1 column with the new migration to track the authenticated(Via email) users.\n\nAlternatively as mentioned above pass it the `-m` flag to instantly run the migrations for you after setup.\n``` bash\n$ php artisan auth:email -m\n```\n\n## Email markup\nTo change the look of the activation email you send to the user, you have to modify the `resources/views/emails/auth.blade.php` blade file.\n\nThis file uses Laravel's 5.4 new feature markdown mailables, please refer to the Laravel documentation for details.\nhttps://laravel.com/docs/5.4/mail#markdown-mailables\n\nThe mailable that is responsible for the markup (subject,sender etc) of the activation mail, is located in the `app/Mail/ActivateAccount.php`.\n\n## Flash messages\nAuth-email provides 2 flash messages out of the box.\n\nThe `authEmail.mailSend` message informs the user after registration to check their inbox and activate their account.\n\nThe `authEmail.confirm` message informs the user, who just tried to login without being authenticated, that they have to click the activate button on the email we sent them.\n\nIf you need to change these messages, you can do so from this file `resources/lang/en/authEmail.php`.\n\n## Queue\n\nThe default behavior is not to implement the ShouldQueue interface, for simplicity on setup. But I strongly encourage you to use queues.\n\nIf you want your email to implement ShouldQueue interface, therefore to be queueable. You can pass it the `-s`, `--queue` flag.\nThen your generated email in the `app/mail/ActivateAccount.php` would implement the ShouldQueue interface.\n\nAlternatively you can manually make it implement ShouldQueue interface.\n\nYou can read more about queues on Laravel's documentation https://laravel.com/docs/5.4/queues.\n\n## Validation\n\nThis package adds one more validation rule called `alpha_spaces`. It considers valid alphanumeric characters and spaces, and is used to validate the `name`, on the registration form.\n\nYou can find the displayed message in, `resources/lang/en/validation.php`, and if you are interested the validation logic is located in this package's ServiceProvider on the register method.\n\n## Generated Files\nList of all the generated files from the `auth:email` command:\n\n| File                                            | Location                            | Functionality                                   |\n| :---------------------------------------------: |-------------------------------------| ------------------------------------------------|\n| LoginController.php                             | /app/Http/Controllers/Auth/         | Adds authenticated method                       |\n| RegisterController.php                          | /app/Http/Controllers/Auth/         | Adds 4 new methods for email authentication     |\n| login.blade.php                                 | /resources/views/auth/              | Adds flash message logic, to display alerts     |\n| auth.blade.php                                  | /resources/views/emails/            | Activation email, with activation link          |\n| Y_m_d_His_create_user_activations_table.php     | /database/migrations/               | Migration that creates table user_activations   |\n| Y_m_d_His_add_boolean_column_to_users_table.php | /database/migrations/               | Adds column activated to users table            |\n| authEmail.php                                   | /resources/lang/en/                 | The messages text exists in this file           |\n| ActivateAccount.php                             | /app/Mail/                          | Mailable, sends the activation mail.            |\n\nAlso one more line is appended into your routes file `web.php`, which creates the activation route of your application.\nThe activation route looks like this `/user/activation/{token}`.\n\n## Requirements\n\nRequires PHP \u003e= 5.6.*\n\nLaravel Framework to be installed, with version \u003e= 5.4\n\n## Supported Laravel versions\n\nThis package supports all Laravel versions from 5.4 onwards.\n\n- From version 1.4.0, support has been added for Laravel 5.6\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email davelis89@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Athanasios Ntavelis][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/ntavelis/auth-email.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/ntavelis/auth-email.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/ntavelis/auth-email\n[link-downloads]: https://packagist.org/packages/ntavelis/auth-email\n[link-author]: https://github.com/ntavelis\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntavelis%2Fauth-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntavelis%2Fauth-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntavelis%2Fauth-email/lists"}