web-identity
Use when selecting OAuth 2.0 / OIDC flows, validating tokens, or integrating identity providers. Do not use when the work is bespoke session management or platform-specific IAM policy.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- web-identity
- license
- MIT
- metadata
- { "owner": "Harley Bartles", "scope": "OAuth 2.0 / OIDC flow selection, token validation, and identity-provider integration", "status": "active", "use_when": [ "selecting OAuth 2.0 / OIDC flows", "validating access, refresh, or ID tokens", "integrating identity providers or designing client consent" ], "source-id": "web-identity", "source-path": "skills/web-identity/SKILL.md", "do_not_use_when": [ "building bespoke session management", "configuring platform-specific IAM policy" ], "provenance-name": "Web Identity first-party skill", "source-category": "first_party" }
- description
- Use when selecting OAuth 2.0 / OIDC flows, validating tokens, or integrating identity providers. Do not use when the work is bespoke session management or platform-specific IAM policy.
02 资源文件 5
- 参考文档agents/openai.yaml411 B
- 资产文件assets/authority/authority.yaml949 B
- 资产文件assets/authority/CITATIONS.md1.4 KB
- 资产文件assets/authority/source-map.yaml401 B
- 参考文档references/operational-guidance.md2.0 KB
03 SKILL.md 正文
Web Identity
Use this skill when choosing or reviewing authentication and authorization boundaries for web applications and APIs.
When to Use
- Selecting an OAuth 2.0 grant type for a client.
- Validating JWT-shaped access or ID tokens.
- Integrating an identity provider and mapping claims to application identity.
- Deciding how and where to store refresh tokens.
- Reviewing consent scopes and token lifetime boundaries.
Do not use this skill for custom session cookies, password hashing, or cloud IAM policy details. Route those to a platform-specific or security-review skill.
Core Patterns
Prefer the authorization-code flow for server-side and single-page applications that can keep a client secret or use PKCE. Use client credentials for machine-to-machine calls without a user present. Use device code for input-constrained clients such as TVs or IoT devices.
ID tokens carry identity claims and are meant for the client. Access tokens grant access to a resource and are validated by the resource server. Refresh tokens are long-lived secrets stored and rotated with care; never expose them to browsers or mobile code that cannot protect them.
Validate tokens by checking signature, issuer, audience, expiration, and intended use. Verify that scopes in the access token match the requested operation. Ask your human partner before choosing implicit or resource-owner-password flows; they are discouraged in modern practice.
Common Mistakes
- Confusing ID tokens with access tokens. ID tokens prove who the user is; access tokens prove permission to act.
- Storing refresh tokens in client-side code. Keep them on a server or secure device storage.
- Ignoring PKCE for public clients such as mobile and SPA apps.
- Requesting overly broad scopes. Ask for the smallest scope that satisfies the feature.
04 同仓库更多 Skills
writing
Use when drafting, revising, or reviewing prose for human readers and clarity, an authorised voice, or reader-fatigue concerns may interact.
writing-with-clarity
Use when drafting, revising, or reviewing prose intended for human readers, including documentation, README files, reports, explanations, UI copy, errors, comments, commit messages, and pull request text.
writing-style
Use when revising or reviewing human-facing prose against an authorised voice card or a contextual reader-fatigue profile.
skill
暂无简介
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment.
writing-roadmaps
Use when a goal is too large for one writing-plans plan and requires a sequenced roadmap of consecutive plans.