Install
$ agentstack add skill-babatunde-fatai-ai-agent-skills-library-social-auth-core ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Quick Navigation
⚠️ READ FIRST: [AGENTEXECUTIONSPEC.md](references/AGENTEXECUTIONSPEC.md) - Security contract and execution order
- Providers: Google | GitHub | LinkedIn | Apple | Twitter/X
- Patterns: OAuth Flow | Golden Path | Token Management | Refresh Token Lifecycle | Sessions | Data Models
- Adapters: Next.js | Express | Vanilla Node | Pseudocode | Laravel | Django | Flask | Rails | Vue
- Governance (mandatory): Env Contract | Error Handling | Account Linking | Testing
Mandatory Start (No Code)
- Produce a Discovery Report before any code or config changes.
- Read mandatory references:
references/AGENT_EXECUTION_SPEC.mdand all governance references inreferences/governance/. - Confirm provider(s), framework, language, deployment environment, and session strategy. If any are missing or ambiguous, stop and ask.
- Verify current provider documentation and security guidance (RFC 9700, RFC 7636, RFC 8252, OIDC Core) before implementation.
Multi-Part Implementation Note
OAuth/OIDC requires coordination between frontend and backend. This skill assumes full-stack access. If implementing in parts:
Scenario 1: Backend-only access
- Implement login start and callback routes.
- Document the route URLs for the frontend team.
- Provide success and error redirect URLs.
- See "Role Selection and Multi-Part Implementation" in
references/AGENT_EXECUTION_SPEC.md.
Scenario 2: Frontend-only access
- Implement a login button that calls an existing backend route.
- Do not implement OAuth flow logic client-side.
- Use the Frontend-Only Discovery Report in AGENTEXECUTIONSPEC.md.
- If the backend uses cookie-based sessions, configure API calls with credentials included and derive auth state from the server.
- Do not modify existing auth logic unrelated to the social login being added.
Scenario 3: Full-stack access (recommended)
- Implement backend first (routes, handlers, validation).
- Then add frontend integration (button, redirects).
- Test end-to-end before deploying.
Discovery Report Requirements (Required First Output)
Include these items, even if the user did not ask:
- Detected framework and runtime (or ambiguity that blocks detection).
- Existing auth stack, session store, user model, and account linking rules.
- Current OAuth providers already integrated and any existing callback routes.
- Deployment constraints (domains, redirect URIs, environment variable system, secrets manager).
- Security middleware already present (CSRF, rate limiting, logging redaction).
If any required item is unknown and cannot be inferred from the repo, stop and ask.
Routing Logic
Provider routing:
- If provider is Google, read
references/providers/google.md. - If provider is GitHub, read
references/providers/github.md. - If provider is LinkedIn, read
references/providers/linkedin.md. - If provider is Apple, read
references/providers/apple.md. - If provider is Twitter/X, read
references/providers/twitter.md. - If provider not supported, create a new provider file under
references/providers/before proceeding. - [All require CREDENTIALS.md first] Google | GitHub | LinkedIn | Apple | Twitter/X
Pattern routing:
- Always read
references/patterns/oauth-flow-core.md. - If you need a canonical end-to-end example, read
references/patterns/golden-path.md. - If tokens are stored, refreshed, or revoked, read
references/patterns/token-management.md. - If refresh tokens are issued or rotated, read
references/patterns/refresh-token-lifecycle.md. - If sessions or cookies are used, read
references/patterns/session-handling.md. - If the project has existing authentication, read
references/patterns/existing-auth-integration.md. - If cookies are used across different domains, read
references/patterns/samesite-decision-tree.md. - If OIDC ID token validation is needed without heavy dependencies, read
references/patterns/jwks-validation-helper.md. - If database changes are needed, read
references/patterns/data-models.md.
Adapter routing:
- If framework is Express, read
references/adapters/express-patterns.md. - If framework is Next.js, read
references/adapters/nextjs-patterns.md. - If framework is vanilla Node or custom server, read
references/adapters/vanilla-node-patterns.md. - If framework is Laravel, read
references/adapters/laravel-patterns.md. - If framework is Django, read
references/adapters/django-patterns.md. - If framework is Flask, read
references/adapters/flask-patterns.md. - If framework is Rails, read
references/adapters/rails-patterns.md. - If framework is Vue, read
references/adapters/vue-patterns.mdand select a backend adapter for server routes. - If framework is unknown or not covered, read
references/adapters/pseudocode-patterns.mdand create a new adapter file.
Governance routing (mandatory in every task):
references/governance/env-contract.mdreferences/governance/error-edge-cases.mdreferences/governance/account-linking.mdreferences/governance/testing-validation.md
Quick Architecture Router (Use After Discovery)
Once you've completed the Discovery Report and confirmed the provider, use this router to find relevant documentation quickly:
Backend Architecture:
- Separate API + frontend → Section 4.2 (JWT) or 4.3 (Sessions)
- Monolithic (Next.js, Rails, Django) → Section 4.3 + framework adapter
- Serverless → Section 4.4 (not yet implemented, use pseudocode patterns)
Provider Documentation:
- Confirmed provider →
references/providers/{provider}/CREDENTIALS.mdthenreferences/providers/{provider}.md - Multiple providers → Read multi-provider patterns first
Account Linking:
- Have
auth_identitiestable → Section 5.1 - Only
userstable → Section 5.2
This router does NOT replace discovery. Always complete the Discovery Report first.
Forbidden Practices (Explicitly Prohibited)
- Implicit flow or token response in front-channel redirects.
- Skipping
stateornoncevalidation. - Wildcard or open redirect URI matching.
- Storing access, refresh, or ID tokens in localStorage or client-side cookies.
- Logging auth codes, tokens, client secrets, or full provider responses.
- Using unverified email claims as proof of identity.
- Reusing sessions across login (no session rotation).
- Committing
.envfiles or hardcoding secrets in logic. - Using the
sub(subject) claim as a display name (it is an ID, not a name).
Stop Conditions (Must Ask Clarifying Questions)
Stop and ask before any implementation if any of these are missing:
- Provider client credentials and allowed redirect URIs.
- The app framework and runtime are ambiguous or conflicting.
- Session strategy is unclear (cookie vs server session store).
- Account linking rules are unknown (merge by email or provider id).
- The environment variable system or secrets manager is not defined.
- Secrets Rotation Strategy is undefined (e.g., how to handle old vs new client secrets during a key roll).
Required Output Structure (Required)
See references/AGENT_EXECUTION_SPEC.md for the required output structure (source of truth). Summary:
- Discovery Report
- Provider Docs Verification
- Required Environment Variables
- Planned File Changes
- Security Checklist Compliance
- Implementation Plan
- Testing Checklist
In Required Environment Variables, always separate backend/server-only vs frontend/public and state who must provide them.
If you cannot comply with the required order, stop and ask for clarification.
Multi-Provider Invariant
Assume multiple providers will coexist. Design routes, database models, and session logic so adding a second provider does not break the first.
Documentation Freshness
Provider files are guidance only. You must verify the latest provider docs before coding. If docs conflict, stop and ask.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Babatunde-Fatai
- Source: Babatunde-Fatai/ai-agent-skills-library
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.