afd-auth

Manage AFD authentication with session states and auth-gated command middleware.

4|1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/lushly-dev/afd --skill afd-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: afd-auth
Source: https://github.com/lushly-dev/afd/tree/main/.claude/skills/afd-auth
Command: npx skills add https://github.com/lushly-dev/afd --skill afd-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a robust, provider-agnostic authentication system for AFD applications, ensuring secure access and managing user sessions effectively.

Core Features & Use Cases

  • Provider-Agnostic Authentication: Integrates seamlessly with various authentication providers.
  • Session Management: Handles authenticated, unauthenticated, and loading states with type safety.
  • Command Gating: Protects commands with authentication middleware.
  • Built-in Adapters: Includes Mock, Convex, and BetterAuth adapters for different environments.
  • Multi-Tab Sync: Ensures consistent session state across multiple browser tabs.
  • Use Case: Securely manage user logins and protect sensitive commands in a web application, ensuring only authenticated users can access certain features.

Quick Start

Use the afd-auth skill to sign in the current user using their credentials.

Frequently Asked Questions about afd-auth

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

FAQPage Schema
How do I add authentication middleware to protect commands in my AFD application?

To add authentication middleware in AFD, you wrap your commands with AFD command wrappers that enforce auth-gated access control, ensuring only authenticated users can execute sensitive operations.

What is the best way to manage session state across multiple browser tabs in a React app?

Managing multi-tab session synchronization ensures consistent authentication state across browser tabs using provided React hooks, keeping user login status synced without requiring manual cross-tab polling.

Can I use BetterAuth or Convex as authentication providers with AFD apps?

Yes, provider-agnostic authentication supports BetterAuth and Convex through built-in adapters, allowing seamless integration of these specific authentication providers into your AFD application environment.

How does provider-agnostic session management handle loading and unauthenticated states?

Provider-agnostic session management uses discriminated unions to handle authenticated, unauthenticated, and loading states with strict type safety, preventing runtime errors during user session transitions.

Does afd-auth require a specific backend framework to handle user logins?

No, afd-auth is provider-agnostic and requires no specific backend framework, utilizing built-in Mock, Convex, and BetterAuth adapters to manage secure user logins across different environments.