PHPackages                             listfixer/yii2-remember-me - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. listfixer/yii2-remember-me

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

listfixer/yii2-remember-me
==========================

Enhanced Remember Me

v1.0.1(9y ago)12.6k1BSD-3-ClausePHP

Since Feb 4Pushed 1y ago3 watchersCompare

[ Source](https://github.com/ListFixer/yii2-remember-me)[ Packagist](https://packagist.org/packages/listfixer/yii2-remember-me)[ RSS](/packages/listfixer-yii2-remember-me/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

yii2-remember-me
================

[](#yii2-remember-me)

This extension replaces the standard "Remember Me" identity cookie functionality of Yii2 with something similar to what is described here:

When a user requests "Remember Me" during login, a new identity cookie is created for that user for that browser/computer. The cookie contains three things which are also stored in a database table: (1) a Cookie ID, which is the record number in the identity cookie database table, (2) A Cookie Key, which is the "password" for that particular cookie, and (3) A User Key, which is the "password" for the associated user. When I say "password", it is a random string, not an actual password. The database stores some other information, including the User ID number.

Each time a user restarts their browser and is authenticated using this system, all three items are checked against the database. If the contents of the cookie match a record in the database, the user gains access to the system and a new User Key is generated. The new User Key is stored in the database and in the identity cookie.

If a particular user uses three different computers, then there will be three different records in the database, one for each cookie. When each of these cookies is used to authenticate a user, the User Key for that particular cookie is regenerated, leaving the other identity cookie User Keys unchanged. This allows a particular user to have "Remember Me" functionality on multiple computers, yet still have their User Key change with each use.

If someone copies or steals an identity cookie, whichever cookie is used first (the original or the copy) will still work, since there is no way to determine which is the original and which is the copy. The User Key will match and a new User Key will be generated. Once the other cookie is used, the User Key will have already changed. The Cookie ID and Cookie Key will match, but the User Key will not, thus indicating that more than one identity cookies exists with this Cookie ID and Cookie Key. The database record is then deleted, thus disabling all cookies with this Cookie ID and Cookie Key.

To create the database table, use this command from your Yii2 application base directory:

php ./yii migrate --migrationPath=@vendor/listfixer/yii2-remember-me/migrations

The database migration assumes that you have a table called "user" with an integer primary key called "id".

To enable this extension, edit your configuration file to include this component information:

'components' =&gt; \[ 'user' =&gt; \[ 'class' =&gt; 'listfixer\\remember\\RememberMe', 'identityClass' =&gt; /\* you should already have something here \*/, 'enableAutoLogin' =&gt; true, \] \]

When a user changes their password, you can configure your system to disable all existing identity cookies for that user by invoking this method:

\\listfixer\\remember\\models\\UserIdentityCookie::deleteUserCookies( $this-&gt;id );

If you are using the Yii2 Advanced template, then this should be added to setPassword() in common/models/User.php.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3390d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e0615335c54379455463087b73c024a889695c5f3f6ba0a03152800cd0e0dc9?d=identicon)[Michael-Labriola](/maintainers/Michael-Labriola)

---

Top Contributors

[![Michael-Labriola](https://avatars.githubusercontent.com/u/24547243?v=4)](https://github.com/Michael-Labriola "Michael-Labriola (9 commits)")

---

Tags

yii2logincookieremember

### Embed Badge

![Health badge](/badges/listfixer-yii2-remember-me/health.svg)

```
[![Health](https://phpackages.com/badges/listfixer-yii2-remember-me/health.svg)](https://phpackages.com/packages/listfixer-yii2-remember-me)
```

###  Alternatives

[xety/cake3-cookieauth

A simple Cake3 plugin to authenticate users with Cookies.

1954.7k2](/packages/xety-cake3-cookieauth)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)[texxasrulez/persistent_login

This server-side plugin is useful for all Roundcube users who don’t like to log into their e-mail account each time they open their browser. The plugin stores a persistent login cookie which automatically logs the user in the next time he or she visits the Roundcube web mailer.

174.8k](/packages/texxasrulez-persistent-login)[rmrevin/yii2-ulogin

Extension for yii2 ulogin integration

1811.9k](/packages/rmrevin-yii2-ulogin)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
