2017 © Pedro Peláez
 

library eloquent-devices

Allows "remember me" tokens to span across multiple devices

image

ltsochev/eloquent-devices

Allows "remember me" tokens to span across multiple devices

  • Tuesday, March 13, 2018
  • by Sk1ppeR
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Allow multiple remember me tokens per user

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)

Installation

Laravel

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)

The Versions

13/03 2018

dev-master

9999999-dev

Allows "remember me" tokens to span across multiple devices

  Sources   Download

MIT

The Requires

 

by Lachezar Tsochev

13/03 2018

v0.0.1

0.0.1.0

Allows "remember me" tokens to span across multiple devices

  Sources   Download

MIT

The Requires

 

by Lachezar Tsochev