knofler/myai/auth-flow-review

Claude Code and agent skill by knofler/myai

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Review and implement authentication flow — audit JWT setup, cookie security, password hashing, token refresh, and protected route middleware. Triggers: auth, authentication, login flow, JWT, auth review, sign in, token

Install

npx vskill@latest install knofler/myai/auth-flow-review

SKILL.md

The same SKILL.md was published earlier as knofler/myai/auth-flow-review.

Auth Flow Review

Review and secure the authentication flow end-to-end.

Tech Stack

JWT (jsonwebtoken/jose) | bcrypt (12+ rounds) | httpOnly cookies

Playbook

1. Audit current auth implementation
  • Map the full flow: register, login, refresh, logout.
  • Check if auth logic is centralized or scattered across routes.
2. Verify JWT configuration
  • Access token: 15 min expiry. Refresh token: 7 days.
  • Payload: sub (user ID), iat, exp only. No sensitive data.
  • Use 256-bit+ secrets from environment variables.
typescript
jwt.sign({ sub: user.id }, process.env.JWT_SECRET, { expiresIn: '15m' });
3. Check httpOnly cookie usage
  • Send tokens as httpOnly cookies (never localStorage).
  • Set Secure: true, SameSite: 'Strict' in production.
typescript
res.cookie('accessToken', token, {
httpOnly: true, secure: true, sameSite: 'strict', maxAge: 15 * 60 * 1000,
});
4. Verify password hashing
  • bcrypt with cost factor >= 12. Never plaintext or reversible encryption.
5. Review token refresh flow
  • POST /api/auth/refresh validates and rotates refresh token.
  • Store refresh tokens in DB for revocation capability.
  • On logout, delete all refresh tokens for the user.
6. Check protected route middleware
  • Extract token from cookie/header, verify signature + expiry.
  • Attach user to req.user. Return 401/403 appropriately.
typescript
function authenticate(req, res, next) {
const token = req.cookies.accessToken;
if (!token) return res.status(401).json({ error: 'Unauthorized' });
try { req.user = jwt.verify(token, process.env.JWT_SECRET); next(); }
catch { return res.status(401).json({ error: 'Invalid token' }); }
}
7. Document findings
  • Log issues with severity. Create remediation tasks.
  • Update state/STATE.md with auth audit status.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/knofler/myai/auth-flow-review/badge)](https://verified-skill.com/skills/knofler/myai/auth-flow-review)

Something wrong with this skill or its page? Tell us.