oauth-2-0-setup

oauth-2-0-setup is a skill for Claude Code, Codex from seb1n/awesome-ai-agent-skills. It costs 53 tokens per session (3,177 once invoked), scanned A, original, MIT.

A guide for adding OAuth 2.0 login and authorization to applications and API connections. OAuth 2.0 lets an app receive limited access to a user's or another service's resources without handling the user's password.

In plain words
What is it for?
Use it to implement browser or mobile login with PKCE, service-to-service access with client credentials, or device-code login for limited-input devices. It covers redirect setup, token storage, refresh-token rotation, and CSRF protection.
Why use it?
It helps choose a suitable login flow and avoid common security problems such as intercepted authorization codes, forged requests, and unsafe token storage.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to implement browser or mobile login with PKCE, service-to-service access with client credentials, or device-code login for limited-input devices. It covers redirect setup, token storage, refresh-token rotation, and CSRF protection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/seb1n/awesome-ai-agent-skills/oauth-2-0-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add seb1n/awesome-ai-agent-skills --skill oauth-2-0-setup
Clone the repo
git clone --depth 1 https://github.com/seb1n/awesome-ai-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for oauth-2-0-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/seb1n/awesome-ai-agent-skills/oauth-2-0-setup/github.svg)](https://agentmods.dev/skills/seb1n/awesome-ai-agent-skills/oauth-2-0-setup)
Your own site
<a href="https://agentmods.dev/skills/seb1n/awesome-ai-agent-skills/oauth-2-0-setup"><img src="https://agentmods.dev/badge/skills/seb1n/awesome-ai-agent-skills/oauth-2-0-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for oauth-2-0-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/seb1n/awesome-ai-agent-skills/oauth-2-0-setup"><img src="https://agentmods.dev/badge/skills/seb1n/awesome-ai-agent-skills/oauth-2-0-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,177 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 9 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 26
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 223
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 283
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 289
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 280
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 292
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Data Exfiltration · line 265
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 269
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Excessive Agency · line 287
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.03177
Opus 5 $0.00026 $0.01588
Sonnet 5 $0.00011 $0.00635
Haiku 4.5 $0.00005 $0.00318

Measured 12d ago against content hash a41a019349ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

oauth-2-0-setup scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const tokenResponse = await fetch(OAUTH_CONFIG.tokenEndpoint, {
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

api-and-integration/oauth-2-0-setup/SKILL.md · 293 lines

How it starts

The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OAuth 2.0 Setup

This skill enables an AI agent to implement OAuth 2.0 authentication for API integrations. The agent selects the appropriate grant type for the use case—authorization code with PKCE for user-facing apps, client credentials for machine-to-machine auth, and device code for input-limited devices. It handles token storage, refresh token rotation, CSRF protection via the state parameter, and secure credential management throughout the flow.

Workflow

  1. Select the appropriate grant type: Choose the OAuth 2.0 flow based on the client type. Use authorization code with PKCE for web and mobile apps where a user is present—PKCE replaces the client secret and prevents authorization code interception attacks. Use client credentials for server-to-server communication with no user context. Use device code flow for CLI tools or smart TVs where browser-based login isn't possible. Implicit flow is deprecated and should not be used.

  2. Register the application with the provider: Create an OAuth application in the provider's developer console (Google, GitHub, Auth0, etc.). Configure the redirect URI precisely—mismatched URIs are the most common setup error. For PKCE flows, mark the application as a public client. Record the client ID, client secret (if applicable), authorization endpoint, token endpoint, and scopes.

  3. Implement the authorization request: Construct the authorization URL with the required parameters: client_id, redirect_uri, response_type=code, scope, and a cryptographically random state parameter for CSRF protection. For PKCE, generate a random code_verifier (43-128 characters), derive the code_challenge using SHA-256, and include both code_challenge and code_challenge_method=S256 in the request. Store the state and code_verifier in the session.

  4. Handle the callback and exchange tokens: When the provider redirects back with the authorization code, first verify the state parameter matches what was stored in the session. Then exchange the code for tokens by POSTing to the token endpoint with grant_type=authorization_code, the authorization code, redirect_uri, client_id, and the code_verifier (for PKCE). Parse the response for access_token, refresh_token, expires_in, and token_type.

Read the full file on GitHub · 293 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 293 lines · 53 tokens per session scan A a41a019349ae

Subscribe to this mod's changes

oauth-2-0-setup is a skill published in the GitHub repository seb1n/awesome-ai-agent-skills (179 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 3,177 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

integrate-webapi

Integrates Power Pages Web API into a site's frontend code with proper permissions and deployment. Orchestrates the full integration lifecycle: code integration, table permissions setup, and deployment for Dataverse CRUD operations. Use when the user wants to add Web API calls, connect to Dataverse, or add data…

microsoft/power-platform-skills · 69 tokens

list-connections

Lists Power Platform connections in the current environment. Use when you need a connection ID before adding a connector to a code app.

microsoft/power-platform-skills · 29 tokens

cross-border-ecommerce

Cross-border e-commerce expansion advisor. Scores target markets on 8 weighted dimensions (market size, ecommerce penetration, competition, regulatory complexity, logistics infrastructure, payment ecosystem, cultural distance, IP protection), compares 5 fulfillment models with cost and transit data, provides…

nexscope-ai/eCommerce-Skills · 106 tokens

ecommerce-email-marketing-builder

E-commerce email marketing system builder. Creates complete email automation flows with full copywriting, subject lines, ESP setup instructions, segmentation rules, and annual campaign calendars. Generates copy-paste-ready email sequences for Klaviyo, Omnisend, Mailchimp, or any ESP. Covers welcome series, cart…

nexscope-ai/eCommerce-Skills · 159 tokens

ecommerce-growth-strategy

E-commerce growth strategy advisor. Diagnoses current business health using unit economics (CAC, LTV, AOV, contribution margin), identifies the highest-impact growth opportunities across 5 levers (traffic, conversion, AOV, retention, expansion), and builds a prioritized 90-day growth roadmap. Uses the Ansoff Matrix…

nexscope-ai/eCommerce-Skills · 175 tokens

ecommerce-ppc-strategy-planner

Cross-platform PPC strategy planner for ecommerce businesses. Analyzes your product and margins, recommends the right advertising platforms (Google Ads, Meta Ads, TikTok Ads), calculates ROAS targets, allocates budget across channels, and generates platform-specific campaign briefs with ad copy and creative direction.…

nexscope-ai/eCommerce-Skills · 122 tokens