{"id":22827232,"url":"https://github.com/rm3web/express-passport-session-tracker","last_synced_at":"2025-09-08T02:34:26.926Z","repository":{"id":57231874,"uuid":"65098445","full_name":"rm3web/express-passport-session-tracker","owner":"rm3web","description":"Maps Passport users to Express sessions and stores it in Redis","archived":false,"fork":false,"pushed_at":"2020-05-23T12:10:02.000Z","size":82,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-09T05:55:14.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rm3web.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-06T19:24:59.000Z","updated_at":"2020-07-30T12:36:38.000Z","dependencies_parsed_at":"2022-09-04T17:31:47.039Z","dependency_job_id":null,"html_url":"https://github.com/rm3web/express-passport-session-tracker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rm3web/express-passport-session-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3web%2Fexpress-passport-session-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3web%2Fexpress-passport-session-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3web%2Fexpress-passport-session-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3web%2Fexpress-passport-session-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm3web","download_url":"https://codeload.github.com/rm3web/express-passport-session-tracker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3web%2Fexpress-passport-session-tracker/sbom","scorecard":{"id":778738,"data":{"date":"2025-08-11","repo":{"name":"github.com/rm3web/express-passport-session-tracker","commit":"589f05f47ce86f7ec9bb0cd9f2e8c27a83a4ae03"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":6,"reason":"Found 6/9 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: BSD 2-Clause \"Simplified\" License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T04:21:01.824Z","repository_id":57231874,"created_at":"2025-08-23T04:21:01.824Z","updated_at":"2025-08-23T04:21:01.824Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274124044,"owners_count":25226267,"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-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-12-12T18:08:40.927Z","updated_at":"2025-09-08T02:34:26.866Z","avatar_url":"https://github.com/rm3web.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Express Passport Session Tracker\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/rm3web/express-passport-session-tracker.svg)](https://greenkeeper.io/)\n\n[![Build Status](https://travis-ci.org/rm3web/express-passport-session-tracker.svg?branch=master)](https://travis-ci.org/rm3web/express-passport-session-tracker)[![codecov](https://codecov.io/gh/rm3web/express-passport-session-tracker/branch/master/graph/badge.svg)](https://codecov.io/gh/rm3web/express-passport-session-tracker)[![dependencies Status](https://david-dm.org/rm3web/express-passport-session-tracker/status.svg)](https://david-dm.org/rm3web/express-passport-session-tracker)[![devDependencies Status](https://david-dm.org/rm3web/express-passport-session-tracker/dev-status.svg)](https://david-dm.org/rm3web/express-passport-session-tracker?type=dev)[![npm version](https://badge.fury.io/js/express-passport-session-tracker.svg)](https://www.npmjs.com/package/express-passport-session-tracker)\n\nIf you follow the recommendations for [The OWASP Session Management Cheat Sheet](https://www.owasp.org/index.php/Session_Management_Cheat_Sheet), you'll notice that there's a suggestion that users be able to observe all of their logged in sessions.\n\n[Express-session](https://www.npmjs.com/package/express-session) only really cares about sessions.  A user's account has potentially nothing to do with a session.\n\n[Passport](http://passportjs.org/) requires that you use express-session (or a similar compatible mechanism) but tracking the mapping between session and user is beyond what it can handle at the moment.\n\nThis library bridges the gap between the two pieces.  It stores a set data structure in Redis keyed off of the username and stores all of the session ID values as a member of the set.  It collects the data by monkey-patching Passport's logIn and logOut function calls.\n\n## How do I use it?\n\nTo attach the middleware\n```node\nvar middleware = require('express-passport-session-tracker').middlware;\nvar redis = require('redis');\nvar client = redis.createClient();\nvar express = require('express');\n\n// Set up an express app\nvar app = express();\n\napp.use(middleware(client, options));\n```\n\nTo get a list of sessions:\n```node\nvar queryForSessions = require('express-passport-session-tracker').queryForSessions;\n\nqueryForSessions(client, user, function(err, data) {\n  if (err) {\n    // Handle error\n  }\n  // data contains the list of sessions as an array\n});\n```\n\n## Contributing\n\n* `npm run lint` to lint\n* `npm test` to test\n* `npm run coverage` to check test coverage\n\nIf you've found a bug:\n * Submit away!\n\nIf you'd like to submit a PR:\n * I do not expect you to smash multiple commits into a single commit.\n * Unless you say otherwise, I'm assuming \"maintainer-fixes\" style of merging, where I fix any quibbles and potentially make minor tweaks.  If you specify \"maintainer-reviews\", I'll maintain a list of things that I've identified for you to change.\n * If you've got a major patch in mind that's larger than an easily-mergable patch, you might consider writing up a blueprint describing what you want to do.\n\nPlease note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms -- see [code of conduct](code_of_conduct.md)\n\n## License?\n\nBSD, see LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm3web%2Fexpress-passport-session-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm3web%2Fexpress-passport-session-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm3web%2Fexpress-passport-session-tracker/lists"}