npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nodebb-plugin-session-guard

v1.0.9

Published

Tek cihaz koruması.

Readme

NodeBB Session Guard (Anti-Sharing Plugin)

This plugin is designed to prevent account sharing on NodeBB forums. It is particularly useful for forums with subscription or premium membership models, ensuring that a single account cannot be shared among multiple people in different locations.

🚀 Features

  • Smart Session Management: Automatically terminates the old session when a user logs in from a different computer or location (different IP).
  • Mobile Exemption: Mobile phones (iOS/Android) are exempt from this restriction. Users can log in from their phones without affecting their desktop sessions.
  • Smart IP Protection: Allows multiple browsers or tabs on the same computer (or same IP address). This prevents users from being logged out when switching browsers or using school/library networks.
  • Global Guard: Uses a global middleware to check every request (Page, API, Assets). Unauthorized sessions are terminated instantly.
  • NodeBB v4.x Compatible: Fully compatible with NodeBB v4.6+ (works directly with the database, bypassing deprecated functions).
  • Admin Exemption: Administrators are exempt from these restrictions.

🛠️ How It Works (Logic Table)

The system behaves differently based on the device type and IP address:

| Scenario | Device Type | IP Address | Result | | :--- | :--- | :--- | :--- | | Logged in from Home PC | Desktop | 192.168.1.5 | ✅ Session Active. | | Then logged in from Phone | Mobile | (Any) | ✅ Session Active. (Both PC and Phone remain active). | | Opened a different browser on same PC | Desktop | 192.168.1.5 | ✅ Session Active. (Same IP = Allowed). | | Friend logged in from their house | Desktop | Different IP | ❌ Old Session KILLED. (Your home session is terminated). | | Logged in from Tablet | Tablet/iPad | (Any) | ⚠️ Tablets are treated as Desktops. If IP is different, old PC session is killed. |


📦 Installation

If this plugin is not published on npm, you can install it manually:

  1. Upload the plugin folder to your node_modules directory:

    /path/to/nodebb/node_modules/nodebb-plugin-session-guard
  2. Activate the plugin:

    ./nodebb activate nodebb-plugin-session-guard
  3. Rebuild and restart NodeBB:

    ./nodebb build
    ./nodebb restart

⚙️ Requirements

  • NodeBB: v3.0.0 or higher (Tested on v4.6.0+)
  • Database: Redis or MongoDB (Compatible with both)

📝 License

MIT