stacks-auth

Implement authentication, RBAC, and multi-factor security in Stacks applications.

2|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/bughq/bughq --skill stacks-auth-bughq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-auth
Source: https://github.com/bughq/bughq/tree/main/.claude/skills/stacks-auth
Command: npx skills add https://github.com/bughq/bughq --skill stacks-auth-bughq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the complex implementation of secure user authentication, role-based access control, and multi-factor security in Stacks applications, preventing common security vulnerabilities.

Core Features & Use Cases

  • Identity Management: Handles registration, session-based auth, token management, and email verification.
  • Security & RBAC: Implements WebAuthn/Passkeys, TOTP/2FA, and granular role-based access control (RBAC) via gates and policies.
  • Use Case: Quickly secure a new dashboard by defining a gate that restricts access to users with an admin role and enforcing authentication via the auth middleware.

Quick Start

Use the stacks-auth skill to implement a new authorization gate that restricts access to the settings page for users with the admin role.

Frequently Asked Questions about stacks-auth

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

FAQPage Schema
How do I implement role-based access control in a Stacks application?

Role-based access control in a Stacks application is implemented by defining custom authorization gates and policies that restrict access to specific routes based on assigned user roles. You can enforce these rules using the built-in auth middleware.

How does WebAuthn passkey integration work for user authentication?

WebAuthn passkey integration works by registering passkeys during the user authentication flow, enabling secure, passwordless identity verification. This mechanism prevents common security vulnerabilities by relying on cryptographic authentication instead of traditional credentials.

What is the best way to set up TOTP and 2FA for API token security?

The best way to set up TOTP and 2FA is to enable multi-factor security protocols alongside token-based API security. This enforces a secondary verification step during the authentication process to protect user sessions and API endpoints.

Can I use auth middleware to restrict access to specific dashboard pages?

Yes, you can use auth middleware to restrict access to specific dashboard pages by defining a custom gate. This gate checks user roles and permissions, ensuring only authorized users, such as admins, can access protected settings pages.

Does session management handle email verification and token generation automatically?

Session management handles email verification and token generation automatically as part of the identity management process. It securely manages user registration, token-based API security, and session-based authentication without requiring manual token logic.

When should I use custom gates instead of standard auth middleware?

Custom gates should be used instead of standard auth middleware when you need granular, role-based permission enforcement beyond basic authentication. Gates allow you to define specific policies restricting access to settings pages or API resources based on complex user roles.