dev-master
9999999-devAllows "remember me" tokens to span across multiple devices
MIT
The Requires
by Lachezar Tsochev
v0.0.1
0.0.1.0Allows "remember me" tokens to span across multiple devices
MIT
The Requires
by Lachezar Tsochev
Wallogit.com
2017 © Pedro Peláez
Allows "remember me" tokens to span across multiple devices
This package allows your users to be remembered by Laravel across multiple devices., (*1)
By default laravel stores the "remember" token in the users table as a singular column, which is an issue when more than one device stores a "remember token", (*2)
This package can be used in Laravel 5.4 or higher. It's not tested on older versions as of yet., (*3)
You can install the package via composer:, (*4)
``` bash composer require ltsochev/eloquent-devices, (*5)
Afterwards you'll need to register the service provider in your `config/app.php` file as follows:
```php
'providers' => [
// ...
Ltsochev\Auth\ServiceProvider::class,
]
make sure it's added after Illuminate\Auth\AuthServiceProvider and Illuminate\Session\SessionServiceProvider so that we are certain the Laravel Auth driver is already loaded., (*6)
Two more settings need to be added to config/auth.php file., (*7)
'token_table' => 'user_tokens', 'driver_name' => 'eloquentdevices',
Once done, you'll have to run migrations for the package, (*8)
php artisan vendor:publish --provider="Ltsochev\Auth\ServiceProvider" --tag="migrations" php artisan migrate
And finally, you'll have to replace the auth driver in your auth config file.
It's easily done by changing the config/auth.php file accordingly:, (*9)
//... 'driver' => 'eloquentdevices',
You can change the name of the abstraction by changing the value of driver_name in your config file., (*10)
And that's it! Your users will be remembered across multiple devices., (*11)
IMPORTANT! The package does not have automated garbage collect as of yet. You'll have to bake in something on your own for this one., (*12)
Allows "remember me" tokens to span across multiple devices
MIT
Allows "remember me" tokens to span across multiple devices
MIT