From supervibe
Use BEFORE implementing authentication TO choose the right flow (authorization-code+PKCE / client-credentials / device-code / resource-owner-password) for the use case. Triggers: 'auth flow', 'дизайн авторизации', 'OAuth выбор', 'как сделать логин'.
npx claudepluginhub vtrka/supervibe --plugin supervibeThis skill is limited to using the following tools:
BEFORE implementing the first auth path of a new app. BEFORE adding a new client type (mobile, CLI, third-party integration) to an existing identity provider. WHEN refresh tokens are not rotating. WHEN logging out only clears a cookie and leaves a JWT alive in localStorage. WHEN someone proposes the password grant for a third-party integration.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
BEFORE implementing the first auth path of a new app. BEFORE adding a new client type (mobile, CLI, third-party integration) to an existing identity provider. WHEN refresh tokens are not rotating. WHEN logging out only clears a cookie and leaves a JWT alive in localStorage. WHEN someone proposes the password grant for a third-party integration.
This skill picks the OAuth 2.x / OIDC flow per client type, defines refresh-token rotation, decides session-cookie vs. token storage, and coordinates logout across SPA + API + IdP.
Follow docs/references/skill-expert-operating-standard.md: start from source of truth, preserve retrieval evidence, apply scope safety, use real producers with runtime receipts for durable delegated outputs, verify before completion claims, and keep confidence below gate when evidence is partial.
grep -rE "grant_type|response_type|client_id|redirect_uri" src/. Each hit is a flow already in production.What is the client type?
Browser SPA / mobile app (public client) → authorization-code + PKCE; NO client secret
Server-to-server / backend job → client-credentials; client secret in secret manager
CLI / TV / device with no browser → device authorization grant
First-party native app + own users (rare) → still authorization-code + PKCE in a system browser
Third-party password grant → REJECT (ROPC); redesign as authorization-code
Token storage on browsers?
HttpOnly+Secure+SameSite cookie (refresh) → preferred; XSS-resistant
In-memory access token, short TTL → preferred; never localStorage
localStorage / sessionStorage → REJECT; trivially exfiltrated by any XSS
Refresh strategy?
Public client (SPA / mobile) → refresh-token ROTATION mandatory; reuse detection revokes the family
Confidential client → rotation recommended; long-lived refresh allowed if bound to client cert
Logout?
Single client → clear cookie + revoke refresh token at IdP
Multiple clients (SSO) → IdP-initiated logout plus back-channel logout and discovery metadata to every relying party
S256, never plain).Authorization header avoids CSRF but takes on XSS risk.supervibe:confidence-scoring with artifact-type=agent-output; ≥9 required to mark this skill complete.Clients:
<client-id> | type=<public|confidential> | flow=<auth-code+PKCE|client-creds|device|...>
redirect_uris=<list> scopes=<list> pkce=S256
Token TTLs:
access: <minutes>
refresh: <hours>; rotation=ON; reuse-detection=family-revocation
Storage:
refresh: HttpOnly + Secure + SameSite=<Lax|Strict>; domain=<auth domain>
access: in-memory only
mobile: Keychain / Keystore
Logout:
server: revoke refresh + clear session
client: BroadcastChannel for tab fanout
IdP: back-channel logout to <list of relying parties>
staleness window: <seconds> for in-flight access tokens
CSRF: <strategy>
Threat-model notes: <XSS / open redirector / mix-up / token substitution>
state alone.S256 for every public client; verifier is checked at the IdP.supervibe:error-envelope-design — auth errors share the project envelope (e.g. auth.token_expired).supervibe:test-strategy — contract tests cover refresh rotation and logout propagation.supervibe:prd — record the flow choice per client as a PRD decision section.supervibe:incident-response — token compromise runbook depends on the rotation + revocation design here.