{"id":22164606,"url":"https://github.com/node-link/cakephp-remember-me","last_synced_at":"2025-07-26T11:31:23.729Z","repository":{"id":57027977,"uuid":"150529175","full_name":"node-link/cakephp-remember-me","owner":"node-link","description":"CakePHP plugin that performs Remember-me authentication with the new cookie algorithm of version 3.5 or later.","archived":false,"fork":false,"pushed_at":"2018-10-29T14:28:27.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T23:03:12.438Z","etag":null,"topics":["cakephp","cakephp-plugin","cookie","remember-me","security"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-link.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-27T04:33:51.000Z","updated_at":"2019-10-10T04:21:34.000Z","dependencies_parsed_at":"2022-08-23T16:20:39.125Z","dependency_job_id":null,"html_url":"https://github.com/node-link/cakephp-remember-me","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/node-link/cakephp-remember-me","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-remember-me","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-remember-me/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-remember-me/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-remember-me/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-link","download_url":"https://codeload.github.com/node-link/cakephp-remember-me/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-remember-me/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266624841,"owners_count":23958303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cakephp","cakephp-plugin","cookie","remember-me","security"],"created_at":"2024-12-02T05:08:57.072Z","updated_at":"2025-07-26T11:31:23.132Z","avatar_url":"https://github.com/node-link.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RememberMe plugin for CakePHP\n\nCakePHP plugin that performs Remember-me authentication with the new cookie algorithm of version 3.5 or later.\n\n## Requirements\n\n* CakePHP 3.5 or later\n* PHP 5.6 or later\n\n## Installation\n\n### 1. Install plugin\n\nYou can install this plugin into your CakePHP application using [composer](http://getcomposer.org).\n\nThe recommended way to install composer packages is:\n\n```bash\ncomposer require node-link/cakephp-remember-me\n```\n\n### 2. Load plugin\n\nPlease load the plugin manually as follows:\n\n```php\n\u003c?php\n// In src/Application.php. Requires at least 3.6.0\nuse Cake\\Http\\BaseApplication;\n\nclass Application extends BaseApplication\n{\n    public function bootstrap()\n    {\n        parent::bootstrap();\n\n        // Load the plugin\n        $this-\u003eaddPlugin('NodeLink/RememberMe');\n    }\n}\n```\n\nPrior to 3.6.0, you should use `Plugin::load()`:\n\n```php\n\u003c?php\n// In config/bootstrap.php\n\nuse Cake\\Core\\Plugin;\n\nPlugin::load('NodeLink/RememberMe', ['bootstrap' =\u003e true]);\n```\n\nOr, use `bin/cake` to load the plugin as follows:\n\n```bash\nbin/cake plugin load -b NodeLink/RememberMe\n```\n\n### 3. Set up `AuthComponent`\n\nIn the `AppController.php` of your application, set up `AuthComponent`.\n\n```php\n\u003c?php\nnamespace App\\Controller;\nuse Cake\\Controller\\Controller;\n\nclass AppController extends Controller\n{\n    public function initialize()\n    {\n        parent::initialize();\n\n        $this-\u003eloadComponent('Auth', [\n            'authenticate' =\u003e [\n                'Form' =\u003e [\n                    'userModel' =\u003e 'Users',\n                    'fields' =\u003e ['username' =\u003e 'username', 'password' =\u003e 'password'],\n                ],\n                'NodeLink/RememberMe.Cookie' =\u003e [\n                    'userModel' =\u003e 'Users',  // Please set the same as 'Form'.\n                    'fields' =\u003e ['token' =\u003e 'remember_token'],  // Specify the column where you want to save the token for Remember-me authentication.\n                ],\n            ],\n        ]);\n\n        // ...\n    }\n}\n```\n\n### 4. Updating database and models\n\nPlease update database and models as necessary.\n\n```sql\nALTER TABLE `users` ADD `remember_token` VARCHAR(64) NULL DEFAULT NULL;\n```\n\n```php\n\u003c?php\nnamespace App\\Model\\Entity;\nuse Cake\\ORM\\Entity;\n\nclass User extends Entity\n{\n    protected $_hidden = [\n        'password',\n        'remember_token',  // Add\n    ];\n}\n```\n\n### 5. Edit login template\n\nAdd the following to your login template:\n\n```php\n\u003c?= $this-\u003eForm-\u003econtrol('remember_me', ['type' =\u003e 'checkbox', 'label' =\u003e __('Remember me')]); ?\u003e\nOr\n\u003c?= $this-\u003eForm-\u003echeckbox('remember_me'); ?\u003e\n\u003c?= $this-\u003eForm-\u003elabel('remember_me', __('Remember me')); ?\u003e\n```\n\n## Configuration\n\nEdit `config/.env` or `config/app.php`.\n\nThe full default configuration is as follows:\n\n```php\n\u003c?php\nreturn [\n    'Security' =\u003e [\n        'cookieKey' =\u003e env('SECURITY_COOKIE_KEY', env('SECURITY_SALT', '__SALT__')),\n    ],\n    'RememberMe' =\u003e [\n        'field' =\u003e 'remember_me',\n        'cookie' =\u003e [\n            'name' =\u003e 'remember_me',\n            'expires' =\u003e '+1 year',\n            'path' =\u003e '',\n            'domain' =\u003e '',\n            'secure' =\u003e false,\n            'httpOnly' =\u003e true,\n        ],\n    ],\n];\n```\n\nIt is recommended to set random string to `SECURITY_COOKIE_KEY` of `config/.env`, or `'Security.cookieKey'` of `config/app.php`.\n\n## Reporting Issues\n\nIf you have a problem with the RememberMe plugin, please send a pull request or open an issue on [GitHub](https://github.com/node-link/cakephp-remember-me/issues).\n\nAlso, I would appreciate it if you contribute to updating `README.md` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-link%2Fcakephp-remember-me","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-link%2Fcakephp-remember-me","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-link%2Fcakephp-remember-me/lists"}