All Projects → barchart → laravel-remember-all

barchart / laravel-remember-all

Licence: MIT license
A Laravel session driver to remember all devices a user has logged in with.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-remember-all

Session
PHP Session Manager (non-blocking, flash, segment, session encryption)
Stars: ✭ 23 (-23.33%)
Mutual labels:  session, session-management
SpringSecurityInEasySteps
Learn Spring Security step by step
Stars: ✭ 13 (-56.67%)
Mutual labels:  session-management, remember-me
sessionx
Go's web session library.
Stars: ✭ 75 (+150%)
Mutual labels:  session, session-management
session
Aplus Framework Session Library
Stars: ✭ 170 (+466.67%)
Mutual labels:  session
PHP-Session
PHP library for handling sessions.
Stars: ✭ 54 (+80%)
Mutual labels:  session
egg-session-redis
redis store for egg session
Stars: ✭ 41 (+36.67%)
Mutual labels:  session
fastify-session
session plugin for fastify
Stars: ✭ 93 (+210%)
Mutual labels:  session
UnityCore
A collection of essential game systems for Unity 3D. These generic systems can be applied to any Unity project.
Stars: ✭ 105 (+250%)
Mutual labels:  session
php session
This is a SESSION class function package, use more easily, just a few simple functions can use it.
Stars: ✭ 52 (+73.33%)
Mutual labels:  session
app
Aplus Framework App Project
Stars: ✭ 338 (+1026.67%)
Mutual labels:  session
framework
Aplus Full-Stack Framework
Stars: ✭ 172 (+473.33%)
Mutual labels:  session
python-pytest-harvest
Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
Stars: ✭ 44 (+46.67%)
Mutual labels:  session
egg-weapp-sdk
Egg的微信小程序登录会话管理SDK
Stars: ✭ 111 (+270%)
Mutual labels:  session
iron-session
🛠 Node.js stateless session utility using signed and encrypted cookies to store data. Works with Next.js, Express, NestJs, Fastify, and any Node.js HTTP framework.
Stars: ✭ 1,729 (+5663.33%)
Mutual labels:  session
nestjs-session
Idiomatic Session Module for NestJS. Built on top of `express-session` 😎
Stars: ✭ 150 (+400%)
Mutual labels:  session
MSession
A simple and sophisticated session and authentication solution written in Swift
Stars: ✭ 26 (-13.33%)
Mutual labels:  session
lumen-session-example
Enable session in lumen framework (Laravel)
Stars: ✭ 22 (-26.67%)
Mutual labels:  session
web-session-counter
Utility to count a user's web sessions based on the definition GA uses.
Stars: ✭ 22 (-26.67%)
Mutual labels:  session
Kalbi
Kalbi - Golang Session Initiated Protocol Framework
Stars: ✭ 85 (+183.33%)
Mutual labels:  session
InstaLite
Instagram api not official easy-to-use class, minimal number of features
Stars: ✭ 72 (+140%)
Mutual labels:  session

Laravel Remember All Devices

Laravel currently only supports the "remember me" feature for one device. When you log in to multiple devices, then log out of one, you will be logged out of all. This solves that by storing the tokens in a separate table.

There is a current proposal to put this into Laravel core, but we needed this now: laravel/ideas#971

Setup

Install via composer:

composer require barchart/laravel-remember-all

Migrate the new remember_tokens table:

php artisan migrate

Update your authentication guard:

'guards' => [
    'web' => [
        'driver' => 'rememberall',
        'provider' => 'users',
        'expire' => 10080, // optional token expiration time, in minutes (7 days is the default)
    ],
],

Eloquent

For Eloquent, you also need to update your model. Just replace Laravel's default User model with the following:

use Barchart\Laravel\RememberAll\User as Authenticatable;

class User extends Authenticatable
{

}

If you're not extending off of Laravel's base User model and instead extending directly off of Eloquent's Model, replace Laravel's default Authenticatable and AuthenticatableContract with the following:

use Barchart\Laravel\RememberAll\EloquentAuthenticatable as Authenticatable;
use Barchart\Laravel\RememberAll\Contracts\Authenticatable as AuthenticatableContract;

class User extends Model implements AuthenticatableContract
{
    use Authenticatable;
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].