/session-management
Implements secure session management with JWT tokens, Redis storage, refresh flows, and proper cookie configuration. Use when building authentication systems, managing user sessions, or implementing secure logout functionality.
One skill from claude-skills.
shell
$ npx -y skills add secondsky/claude-skills --skill session-management --agent claude-codeInstalls just this skill. Get the whole plugin for auto-invocation.
How it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/session-management
Context preview
The summary Claude sees to decide when to auto-load this skill.
Implements secure session management with JWT tokens, Redis storage, refresh flows, and proper cookie configuration. Use when building authentication systems, managing user sessions, or implementing secure logout functionality.
Stats
Stars194
Forks29
LanguageTypeScript
LicenseMIT
Ships with claude-skills
SKILL.md
session-management.SKILL.md
--- name: session-management description: Implements secure session management with JWT tokens, Redis storage, refresh flows, and proper cookie configuration. Use when building authentication systems, managing user sessions, or implementing secure logout functionality. license: MIT --- # Session Management Implement secure session management with proper token handling and storage. ## Token-Based Sessions ```javascript const jwt = require('jsonwebtoken'); function generateTokens(user) { const accessToken = jwt.sign( { userId: user.id, role: user.role, type: 'access' }, process.env.JWT_SECRET, { expiresIn: '1h' } ); const refreshToken = jwt.sign( { userId: user.id, type: 'refresh' }, process.env.REFRESH_SECRET, { expiresIn: '7d' } ); return { accessToken, refreshToken }; } ``` ## Redis Session Storage ```javascript const redis = require('redis'); const client = redis.createClient(); class SessionStore {
