add-auth

Detect existing auth providers and extend authentication without unsafe migration.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill add-auth-jnlanahan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-auth
Source: https://github.com/jnlanahan/Product-Agents-and-Skills/tree/main/skills/4-Build-Auth
Command: npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill add-auth-jnlanahan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents broken or insecure authentication changes by guiding you to add or extend auth in your existing app without migrating between providers.

Core Features & Use Cases

  • Provider detection and safe extension: Detects existing auth integrations (Neon Auth/Better Auth, Firebase Auth, Clerk, NextAuth/Auth.js, Supabase Auth, or custom JWT) and adapts the implementation to match what’s already wired.
  • Auth feature coverage: Implements sign-up/sign-in, Google OAuth sign-in, MFA, organizations/teams, role-based access, session management, and account linking.
  • End-to-end verification: Ensures login/logout/session expiry and protected-route access work correctly, with explicit security checks for cookie settings, CSRF/rate limiting, and server-side session verification.

Quick Start

Use the add-auth skill to add Google Sign-In and role-based access to your existing authentication setup.

Frequently Asked Questions about add-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication to an existing app without migrating providers?

To add authentication without migrating providers, you can detect your existing auth setup and extend it. This approach safely wires sign-in, MFA, and role-based access while preventing unsafe provider replacement and broken sessions.

Does this approach support adding Google OAuth and MFA to NextAuth or Clerk?

Yes, adding Google OAuth and MFA supports existing integrations like NextAuth, Clerk, Firebase Auth, and Supabase Auth. It detects your current provider and adapts the implementation to match your existing authentication setup seamlessly.

What is the best way to enforce role-based access control on protected routes?

The best way to enforce role-based access control on protected routes is by verifying sessions server-side and checking user roles before rendering. This ensures secure authorization while correctly handling cookie settings and session expiry.

How do I implement organizations and teams for role-based authorization?

You can implement organizations and teams by extending your current authentication provider's data model. This allows you to group users, assign specific roles, and enforce team-level authorization permissions across protected application routes.

Can I add secure session management without breaking my custom JWT implementation?

Yes, you can add secure session management to a custom JWT setup by adapting the implementation to your existing tokens. It ensures correct cookie handling, server-side session verification, and validates end-to-end session expiry behavior.