https://github.com/wingsline/laravel-passwordlessauth
Laravel passwordless authentication using temporary signed routes.
https://github.com/wingsline/laravel-passwordlessauth
Last synced: 3 months ago
JSON representation
Laravel passwordless authentication using temporary signed routes.
- Host: GitHub
- URL: https://github.com/wingsline/laravel-passwordlessauth
- Owner: wingsline
- License: other
- Created: 2020-06-23T18:35:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T21:53:15.000Z (over 3 years ago)
- Last Synced: 2025-01-25T23:44:51.376Z (over 1 year ago)
- Language: PHP
- Size: 235 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: license.md
Awesome Lists containing this project
README
# PasswordlessAuth
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Total Downloads][ico-downloads]][link-downloads]
[![Build Status][ico-travis]][link-travis]
[![StyleCI][ico-styleci]][link-styleci]
This package will enable passwordless authentication using temporary signed routes. Take a look at [contributing.md](contributing.md) to see a to do list.
## Installation
Create a new Laravel application with:
```bash
laravel new myapp --auth
```
Via Composer
``` bash
$ composer require wingsline/passwordlessauth
```
Remove the `Auth::routes();` from the `routes/web.php` and replace it with:
```php
use Wingsline\PasswordlessAuth\Facades\PasswordlessAuth;
PasswordlessAuth::routes();
```
Replace the following route names in the original views with the `passwordless.` prefix:
* login -> passwordless.login
* register -> passwordless.register
* logout -> passwordless.logout
* verification.resend -> passwordless.verification.resend
Replace the `auth` middleware in `app/Http/Kernel.php`:
``` php
protected $routeMiddleware = [
'auth' => \Wingsline\PasswordlessAuth\Middleware\Authenticate::class,
]
```
Add the following method to the `User` model and make sure the model
implements the `Illuminate\Contracts\Auth\MustVerifyEmail` interface:
```php
use Wingsline\PasswordlessAuth\Notifications\VerifyEmail;
/**
* Send the email verification notification.
*
* @return void
*/
public function sendEmailVerificationNotification()
{
$this->notify(new VerifyEmail);
}
```
## Change log
Please see the [changelog](changelog.md) for more information on what has changed recently.
## Testing
``` bash
$ composer test
```
## Contributing
Please see [contributing.md](contributing.md) for details and a todolist.
## Security
If you discover any security related issues, please email wingsline@gmail.com instead of using the issue tracker.
## Credits
- [Arpad Olasz][link-author]
- [All Contributors][link-contributors]
## License
MIT. Please see the [license file](license.md) for more information.
[ico-version]: https://img.shields.io/packagist/v/wingsline/passwordlessauth.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/wingsline/passwordlessauth.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/wingsline/laravel-passwordlessauth/master.svg?style=flat-square
[ico-styleci]: https://styleci.io/repos/274481196/shield
[link-packagist]: https://packagist.org/packages/wingsline/passwordlessauth
[link-downloads]: https://packagist.org/packages/wingsline/passwordlessauth
[link-travis]: https://travis-ci.org/wingsline/laravel-passwordlessauth
[link-styleci]: https://styleci.io/repos/274481196
[link-author]: https://github.com/wingsline
[link-contributors]: ../../contributors