authentication-sessions
Skill11 starsChanged 10 days agoMITView on GitHub
Use when implementing or reviewing login, registration, password reset, MFA, OAuth or OIDC integration, session cookies, token lifecycle, and account recovery.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- tayyebi/skillstheir own version, first seen Nov 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- tayyebi/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- document-head-seoSkill
- font-performanceSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Verify identities safely and maintain sessions with bounded lifetime, protected transport and predictable invalidation.
- Distinctive: line 15
Use authorization code flow with PKCE for browser-based public clients.
- Distinctive: line 16
Never embed client secrets in browser bundles, mobile packages or public repositories.
- Distinctive: line 17
Use MFA or phishing-resistant authentication for privileged and high-risk accounts where supported.
- Distinctive: line 19
Use established password hashing implementations with current recommended parameters when passwords must be stored.
- Distinctive: line 24
Prefer secure, HttpOnly, appropriately SameSite cookies for browser sessions when the architecture supports them.
- Distinctive: line 30
Do not store long-lived bearer tokens in localStorage as a default browser strategy.
- Distinctive: line 31
Never log raw passwords, session cookies, access tokens, refresh tokens or recovery secrets.
- Distinctive: line 39
Test expired, revoked, replayed and malformed tokens.
- Distinctive: line 62
Verify the same for privilege-elevation and account-switch transitions.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Authentication and Session Security
Objective
Verify identities safely and maintain sessions with bounded lifetime, protected transport and predictable invalidation. Prefer established identity providers and framework security libraries over custom cryptography or token protocols.
Authentication workflow
- Select an established identity protocol and provider appropriate to the application. Use OAuth 2.0 for delegated authorization and OpenID Connect when an identity layer is required.
- Use authorization code flow with PKCE for browser-based public clients. Validate issuer, audience, signature, expiry, nonce and redirect URI according to the protocol and provider.
- Never embed client secrets in browser bundles, mobile packages or public repositories.
- Use MFA or phishing-resistant authentication for privileged and high-risk accounts where supported.
- Rate-limit login, password reset, verification and recovery operations. Avoid account enumeration through distinguishable responses.
- Use established password hashing implementations with current recommended parameters when passwords must be stored. Never store plaintext or reversibly encrypted passwords.
- Design recovery flows with short-lived, single-use tokens and explicit user notification for sensitive changes.
Session management
- Prefer secure, HttpOnly, appropriately SameSite cookies for browser sessions when the architecture supports them.
- Require HTTPS and set the Secure cookie attribute in production.
- Regenerate session identifiers after login, privilege changes and other trust transitions.
- Enforce idle and absolute expiration appropriate to risk.
- Invalidate sessions on logout, credential reset, account compromise and relevant privilege changes.
- Protect state-changing cookie-authenticated requests against CSRF.
- Do not store long-lived bearer tokens in localStorage as a default browser strategy.
- Never log raw passwords, session cookies, access tokens, refresh tokens or recovery secrets.
OAuth and OIDC checks
Validate redirect URIs exactly, use state for request correlation, use nonce where required, validate PKCE, restrict requested scopes, and protect refresh-token rotation and reuse detection. Do not accept arbitrary return URLs or infer identity from unverified token claims.
Verification
Test expired, revoked, replayed and malformed tokens; session fixation; logout invalidation; CSRF; brute-force controls; MFA recovery; account enumeration; and privilege changes. Include negative tests for invalid issuer, audience, signature and redirect URI.
Completion criteria
Identity protocol validation is correct, sessions are protected and revocable, recovery and MFA flows resist abuse, and secrets are absent from client code and logs.
Common AI failure mode
Failure: An agent implements login successfully but reuses the pre-authentication session identifier after login, and at privilege or trust transitions (elevation, account switch, MFA completion).
Why it matters: An attacker who can fix or pre-seed a session identifier inherits the authenticated identity of the victim after login. The compromise survives the login boundary and persists across privileged actions and account data, even though the login flow itself appears to work.
Prevention: Regenerate the session identifier at authentication and at every privilege or trust transition; invalidate the prior identifier server-side after rotation. Set idle and absolute expiry, and revoke the session on logout and on credential or security events. Test fixation by establishing a pre-login session, completing login, and proving the pre-login identifier cannot authenticate any privileged request after that point. Verify the same for privilege-elevation and account-switch transitions.
Token storage and exposure (localStorage, URLs, logs, analytics, error reports, telemetry) is a related but distinct failure mode — see
secrets-configuration.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

