auth-providers

auth-providers is a cursor rule for Cursor from airweave-ai/airweave. It costs 0 tokens per session (1,110 once invoked), scanned A, original, MIT.

A service layer lets Pipedream and Composio provide credentials for connected data sources. OAuth is a sign-in method that grants access without asking users to share passwords directly.

In plain words
What is it for?
Use it to create source connections through supported authentication providers and retrieve the credentials those connections need.
Why use it?
It reduces the need to store and manage connection credentials yourself, especially when many users need to connect services.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to create source connections through supported authentication providers and retrieve the credentials those connections need.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/airweave-ai/airweave/auth-providers
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.

Clone the repo
git clone --depth 1 https://github.com/airweave-ai/airweave

Made for: Cursor.

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-providers

README.md
[![agentmods](https://agentmods.dev/badge/rules/airweave-ai/airweave/auth-providers.svg)](https://agentmods.dev/rules/airweave-ai/airweave/auth-providers)
Your own site
<a href="https://agentmods.dev/rules/airweave-ai/airweave/auth-providers"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/auth-providers.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,110 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.01110
Opus 5 $0.00000 $0.00555
Sonnet 5 $0.00000 $0.00222
Haiku 4.5 $0.00000 $0.00111

Measured 7d ago against content hash 768703f79b28, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

auth-providers 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 7d 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.

.cursor/rules/auth-providers.mdc · 125 lines

How it starts

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

Airweave Auth Providers

Overview

Auth providers enable third-party services (Pipedream, Composio) to supply credentials for source connections, eliminating manual credential management and enabling OAuth at scale for agent developers who are already using these connector providers.

Architecture

Core Components

domains/auth_provider/
├── _base.py              # BaseAuthProvider abstract class
├── auth_result.py        # AuthResult dataclass
├── exceptions.py         # Typed exception hierarchy
├── protocols.py          # Domain protocols
├── registry.py           # Provider discovery/registration
├── service.py            # AuthProviderService
├── types.py              # Shared type aliases
├── providers/
│   ├── composio.py       # API key provider
│   ├── klavis.py         # Future provider
│   └── pipedream.py      # OAuth2 provider (tokens expire in 3600s)
└── tests/

Provider Registration

@auth_provider(
    name="Pipedream",
    short_name="pipedream",
    auth_config_class=PipedreamAuthConfig,
    config_class=PipedreamConfig,
)
class PipedreamAuthProvider(BaseAuthProvider):
    async def create(credentials, config): ...
    async def get_creds_for_source(source_short_name, fields): ...

Provider Configuration

Providers have several configuration mechanisms:

Field Mappings

Map between Airweave and external service naming:

# Map Airweave field names to provider field names
FIELD_NAME_MAPPING = {"api_key": "generic_api_key", "personal_access_token": "access_token"}

# Map Airweave source names to provider source names (only needed when names differ)
SLUG_NAME_MAPPING = {
    "google_drive": "googledrive",
    "google_slides": "googleslides",
    "outlook_mail": "outlook"
}

Integration with TokenProviderProtocol

Auth providers integrate via AuthProviderTokenProvider, one of three TokenProviderProtocol implementations:

Protocol hierarchy

SourceAuthProvider (Protocol)          — base: provider_kind + supports_refresh
├── TokenProviderProtocol (Protocol)   — get_token() + force_refresh()
│   ├── OAuthTokenProvider             — expiry-aware refresh, DB-backed
│   ├── StaticTokenProvider            — raw string / API key (no refresh)
│   └── AuthProviderTokenProvider      — delegates to Pipedream / Composio
└── DirectCredentialProvider[T]        — structured creds (NTLM, client_credentials)

Read the full file on GitHub · 125 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. 7d ago First seen · 125 lines · 1,110 tokens per session scan A 768703f79b28

Subscribe to this mod's changes

auth-providers is a cursor rule published in the GitHub repository airweave-ai/airweave (6,565 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,110 tokens. 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-30.