Skip to content
Back to skills

Review Auth Flow

ASecurity

Reviews an authentication or session design (OAuth or OIDC, tokens, cookies, MFA, password reset) for known flaws, with attack paths and fixes. Use before building or shipping login and session code.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agentsgoawsapifrontendbackendsecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add hermes-hq/hodios-dist --skill review-auth-flow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Review Auth Flow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Review Auth Flow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hermes-hq-review-auth-flow/badge)](https://www.skillsdirectory.com/skills/hermes-hq-review-auth-flow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: review-auth-flow
description: Reviews an authentication or session design (OAuth or OIDC, tokens, cookies, MFA, password reset) for known flaws, with attack paths and fixes. Use before building or shipping login and session code.
license: CC0-1.0
arguments:
  - design_or_code
  - app_type
argument-hint: <design_or_code> [app_type]
disable-model-invocation: true
metadata:
  version: 1.0.1
  kind: prompt
  category: security
  source: https://hermes-ide.com/prompts/review-auth-flow
  catalog: 2026.1014.1
---

# Review an authentication flow

## Inputs

- `design_or_code` (required): The design document, sequence diagram, configuration or code for login, sessions, tokens, MFA, password reset or account recovery.
- `app_type` (optional; one of: web, spa, mobile, api; default: web): Client type, which decides token storage and flow rules.

Arguments fill these in order. If a required value is empty, take it from the user’s message or ask for it once.

<context>
Authentication bugs are rarely in the cryptography. They are in the glue: a redirect URI matched by prefix, an ID token accepted without checking its audience, a refresh token that never rotates, a password reset link built from the Host header, MFA enforced on the login form but not on the API or the recovery path. Each has a well-known attack. The review must find these with a concrete path from attacker to account takeover, not list every best practice.
</context>

<task>
Review this authentication design for a $app_type application:
$design_or_code

Check each area that the material covers:
1. OAuth and OIDC: authorization code flow with PKCE for public clients (no implicit flow), `state` and `nonce` validated, exact redirect URI matching, ID token validation (signature, `iss`, `aud`, `exp`, allowed algorithms only), ID tokens never used as API access tokens, access tokens checked for audience, account linking only on verified email.
2. Tokens: short access-token lifetimes, refresh-token rotation with reuse detection, a revocation strategy for stateless tokens, no sensitive data in JWT claims, `kid` and `alg` handling that cannot be steered by the attacker.
3. Storage by client type: for a SPA, no long-lived tokens in localStorage (prefer a backend-for-frontend with HttpOnly cookies); for mobile, the platform keystore, the system browser rather than an embedded web view, and claimed HTTPS redirect URIs; for an API, scoped, hashed and rotatable keys.
4. Sessions and cookies: new session ID on login and privilege change, `Secure`, `HttpOnly`, `SameSite` and the `__Host-` prefix, idle and absolute timeouts, server-side invalidation on logout and password change, CSRF protection for cookie-authenticated state changes.
5. Passwords: a slow, salted hash (Argon2id, scrypt or bcrypt) with sound parameters, breached-password checks, rate limiting and credential-stuffing defences, no account enumeration through messages or timing.
6. Reset and recovery: single-use, short-lived, high-entropy tokens stored hashed; links built from configuration, not the Host header; existing sessions revoked after reset; recovery paths no weaker than login.
7. MFA: enforced server-side on every path (API, legacy endpoints, recovery), OTP attempts rate-limited, recovery codes, protection against push-fatigue, phishing-resistant options for high-value accounts.

Report a finding only when you can describe the attack path: who the attacker is, what they do step by step, and what they gain.
</task>

<constraints>
- Quote the line, setting or diagram step each finding is about. If a decision is not shown, ask about it under Questions instead of assuming it is wrong.
- Rank by impact: account takeover and token theft first, hardening last.
- Reference OWASP ASVS by chapter name where relevant; do not invent requirement numbers.
- Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
- If the information you need is not available, say what is missing and how to get it instead of inventing it.
</constraints>

<output_format>
## Verdict
One line: ship | ship after fixes | redesign needed. Then one sentence why.
## Findings
Numbered. Each: severity, location, the attack path in steps, the impact, and the fix.
## Verified safe
Bullets of areas you checked and found sound.
## Questions
Decisions the material does not show that change the risk.
</output_format>

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.