home / skills / ehtbanton / claudeskillsrepo / oauth-config-generator

oauth-config-generator skill

/oauth-config-generator

This skill generates complete OAuth 2.0 configuration for social providers like Google and GitHub as TypeScript output.

npx playbooks add skill ehtbanton/claudeskillsrepo --skill oauth-config-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
712 B
---
name: oauth-config-generator
description: Generate OAuth 2.0 configuration for social login providers (Google, GitHub, etc.). Triggers on "create oauth config", "generate oauth setup", "social login config", "oauth2 integration".
---

# OAuth Config Generator

Generate OAuth 2.0 configuration for social authentication providers.

## Output Requirements

**File Output:** `oauth.ts` with provider configurations
**Format:** Valid TypeScript
**Standards:** OAuth 2.0, Passport.js

## When Invoked

Immediately generate complete OAuth configuration for specified providers.

## Example Invocations

**Prompt:** "Create OAuth config for Google and GitHub"
**Output:** Complete OAuth setup with both providers.

Overview

This skill generates a ready-to-use OAuth 2.0 configuration file (oauth.ts) for common social login providers like Google and GitHub. It produces TypeScript code compatible with Passport.js and follows OAuth 2.0 best practices to jumpstart social authentication integration. The output is a complete provider setup you can drop into a Node/Express project.

How this skill works

When triggered, the skill asks which providers you need and any environment variable naming preferences, then emits a fully-formed oauth.ts file that exports configured Passport strategies and helper functions. The generated code includes client ID/secret placeholders, callback routes, scope defaults, and instructions for environment variables. It validates basic inputs and structures the file to be modular, typed, and easy to adapt.

When to use it

  • Adding social login to a new Node/Express project using Passport.js
  • Rapidly scaffolding OAuth 2.0 configs for Google, GitHub, Facebook, or Microsoft
  • Creating a reference oauth.ts file for team onboarding or documentation
  • Migrating from ad-hoc scripts to a typed, maintainable config file
  • Prototyping multi-provider authentication flows for testing

Best practices

  • Store client IDs and secrets in environment variables, not in source control
  • Use distinct callback URLs per environment (dev/staging/production) and register them with the provider
  • Limit scopes to the minimum required for your app and request additional scopes only when needed
  • Include error handling for failed auth exchanges and token refresh where applicable
  • Audit and rotate credentials periodically and follow provider security guidance

Example use cases

  • Create oauth.ts with Google and GitHub providers for a starter Express app
  • Generate a single-file OAuth setup to integrate social login into an existing API
  • Produce provider configs with typed strategy exports for a TypeScript codebase
  • Scaffold callback routes and scope defaults for rapid end-to-end testing
  • Provide a secure template for team members to fill in provider credentials

FAQ

Which providers are supported?

The skill generates configs for major providers like Google, GitHub, Facebook, and Microsoft; additional providers can be added on request.

Does the skill include secrets?

No. It emits placeholders and recommends environment variables; you must supply client IDs and secrets via env files or secret management.