auth-provider-add

auth-provider-add is a command for coding agents from smicolon/ai-kit. It costs 12 tokens per session (1,879 once invoked), scanned A, original, MIT.

A command for adding another login provider to Better Auth, such as an external identity service.

In plain words
What is it for?
Use it to configure an additional provider for user sign-in.
Why use it?
It avoids manually wiring a new authentication provider into an existing Better Auth setup.

Command

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.

agentmods
npx agentmods add commands/smicolon/ai-kit/auth-provider-add
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

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 auth-provider-add

README.md
[![agentmods](https://agentmods.dev/badge/commands/smicolon/ai-kit/auth-provider-add.svg)](https://agentmods.dev/commands/smicolon/ai-kit/auth-provider-add)
Your own site
<a href="https://agentmods.dev/commands/smicolon/ai-kit/auth-provider-add"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/auth-provider-add.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,879 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00012 $0.01879
Opus 5 $0.00006 $0.00940
Sonnet 5 $0.00002 $0.00376
Haiku 4.5 $0.00001 $0.00188

Measured 5d ago against content hash 4c6045ec7ebf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

auth-provider-add scanned grade A with 0 findings 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/better-auth/commands/auth-provider-add.md · 266 lines

How it starts

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

Add Authentication Provider

Add a new social/OAuth provider to your Better Auth configuration.

Supported Providers

  • google - Google OAuth 2.0
  • github - GitHub OAuth
  • discord - Discord OAuth
  • apple - Apple Sign In
  • microsoft - Microsoft Identity
  • twitter - Twitter/X OAuth 2.0
  • facebook - Facebook Login
  • linkedin - LinkedIn OAuth
  • gitlab - GitLab OAuth
  • slack - Slack OAuth

Instructions

  1. Get Provider Credentials:

    Google:

    • Go to Google Cloud Console
    • Create OAuth 2.0 credentials
    • Add authorized redirect URI: {YOUR_API_URL}/api/auth/callback/google

    GitHub:

    Discord:

    • Go to Discord Developer Portal
    • Create application, get OAuth2 credentials
    • Add redirect: {YOUR_API_URL}/api/auth/callback/discord

    Apple:

    • Go to Apple Developer
    • Create Service ID with Sign In with Apple capability
    • Configure return URL: {YOUR_API_URL}/api/auth/callback/apple

    Microsoft:

    • Go to Azure Portal
    • Register application in Azure AD
    • Add redirect URI: {YOUR_API_URL}/api/auth/callback/microsoft
  2. Add Environment Variables to .env:

    # Google
    GOOGLE_CLIENT_ID=your-client-id
    GOOGLE_CLIENT_SECRET=your-client-secret
    
    # GitHub
    GITHUB_CLIENT_ID=your-client-id
    GITHUB_CLIENT_SECRET=your-client-secret
    
    # Discord
    DISCORD_CLIENT_ID=your-client-id
    DISCORD_CLIENT_SECRET=your-client-secret
    
    # Apple
    APPLE_CLIENT_ID=your-service-id
    APPLE_CLIENT_SECRET=your-client-secret
    APPLE_TEAM_ID=your-team-id
    APPLE_KEY_ID=your-key-id
    
    # Microsoft
    MICROSOFT_CLIENT_ID=your-client-id
    MICROSOFT_CLIENT_SECRET=your-client-secret
    MICROSOFT_TENANT_ID=your-tenant-id
    

Read the full file on GitHub · 266 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. 5d ago First seen · 266 lines · 12 tokens per session scan A 4c6045ec7ebf

Subscribe to this mod's changes

auth-provider-add is a command published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 1,879 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.