ws-user v1.0.0-rc.3 provides user authentication and authorization tailored for WebSocket applications. It offers registration, login, logout, and password/email management with WebSocket-native patterns. Unlike generic auth libraries, it integrates directly with WebSocket lifecycle events. As a release candidate, the API is stable but may see minor changes before v1.0.0. Development appears active on GitHub, with releases on npm.
npm install ws-userNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a WebSocket server with user registration, login, and logout using ws-user. Demonstrates createUserApp and basic message handling.
Pin to exact version and test before upgrading.
Set database: process.env.DATABASE_URL || 'sqlite://prod.db'
Use authenticate for now, but plan migration.
Install 'ws' or 'uws' separately.
Migrate to async/await pattern.
Install ws: npm install ws and import WebSocket from 'ws'
Ensure createUserApp returns an object with register, login, etc. Check import
Set a strong JWT_SECRET environment variable
npm install ws-user@rc
No dependency data recorded yet.