{"id":13781277,"url":"https://github.com/thinkjs/think-session-cookie","last_synced_at":"2025-09-04T18:46:08.335Z","repository":{"id":65374757,"uuid":"85461866","full_name":"thinkjs/think-session-cookie","owner":"thinkjs","description":"Use cookie to store session for ThinkJS 3.x","archived":false,"fork":false,"pushed_at":"2019-12-23T07:55:45.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-16T00:47:57.904Z","etag":null,"topics":["cookie","session","think-adapter","thinkjs3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/thinkjs.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":"2017-03-19T08:38:03.000Z","updated_at":"2019-12-23T07:55:47.000Z","dependencies_parsed_at":"2023-01-20T01:25:23.735Z","dependency_job_id":null,"html_url":"https://github.com/thinkjs/think-session-cookie","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-cookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-cookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-cookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-cookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkjs","download_url":"https://codeload.github.com/thinkjs/think-session-cookie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281415,"owners_count":21077423,"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","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":["cookie","session","think-adapter","thinkjs3"],"created_at":"2024-08-03T18:01:24.485Z","updated_at":"2025-04-10T19:37:05.546Z","avatar_url":"https://github.com/thinkjs.png","language":"JavaScript","readme":"# think-session-cookie\n[![Build Status](https://travis-ci.org/thinkjs/think-session-cookie.svg?branch=master)](https://travis-ci.org/thinkjs/think-session-cookie)\n[![Coverage Status](https://coveralls.io/repos/github/thinkjs/think-session-cookie/badge.svg?branch=master)](https://coveralls.io/github/thinkjs/think-session-cookie?branch=master)\n[![npm](https://img.shields.io/npm/v/think-session-cookie.svg?style=flat-square)](https://www.npmjs.com/package/think-session-cookie)\n\nUse cookie to store session\n\n## Install\n\n```\nnpm install think-session-cookie\n```\n\n## How to use\n\nconfig file `src/config/adapter.js`, add options:\n\n```js\nconst cookie = require('think-session-cookie');\nexports.session = {\n  type: 'cookie',\n  common: {\n    cookie: {\n      name: 'thinkjs',\n      autoUpdate: false, //auto update cookie when maxAge is set\n      //maxAge: '',\n      //expires: '',\n      path: '/',  //a string indicating the path of the cookie\n      //domain: '',\n      //secure: false,\n      //keys: [],\n      httpOnly: true,\n      sameSite: false,\n      signed: false,\n      overwrite: false\n    }\n  },\n  cookie: {\n    handle: cookie,\n    cookie: {\n      encrypt: false //encrypt cookie data\n    }\n  }\n}\n```\n","funding_links":[],"categories":["Adapters"],"sub_categories":["session"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-session-cookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkjs%2Fthink-session-cookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-session-cookie/lists"}