auth-expert

Design and implement JWT-based authentication with RBAC and secure token storage.

Updated Oct 17, 2025
One-click install
npx skills add https://github.com/duynhne/monitoring --skill auth-expert-duynhne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-expert
Source: https://github.com/duynhne/monitoring/tree/main/.agent/skills/auth-expert
Command: npx skills add https://github.com/duynhne/monitoring --skill auth-expert-duynhne

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a framework of best practices and reusable patterns to design and implement robust authentication and authorization in software systems, reducing security risk and development time.

Core Features & Use Cases

  • JWT-based authentication: issuing and validating signed tokens with proper expiration and refresh handling.
  • OAuth 2.0 guidance: secure integration and token exchange flows for third-party providers.
  • RBAC and password security: role-based access control, password hashing, and secure credential storage.
  • Use Case: implement a login flow that issues an httpOnly secure cookie with a short-lived access token and a refresh mechanism.

Quick Start

Create a secure login endpoint that issues a signed JWT and stores it in an httpOnly cookie; configure token rotation and RBAC checks.

Frequently Asked Questions about auth-expert

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

FAQPage Schema
How do I implement JWT authentication with secure httpOnly cookies?

JWT authentication with httpOnly cookies involves issuing a signed token upon login and storing it in an httpOnly secure cookie. You configure short-lived access tokens, a refresh mechanism, and proper token rotation to maintain secure sessions.

What is the best way to set up OAuth 2.0 token exchange flows?

OAuth 2.0 token exchange flows are best set up by following secure integration patterns for third-party providers. This involves establishing secure token exchange flows and applying concrete best practices to mitigate threats during the authorization process.

How does RBAC work for API access control?

RBAC for API access control works by assigning roles to users and checking those roles against required permissions before granting access. It enforces access control across multiple components, ensuring users only reach resources their role permits.

Can I use this approach for both web applications and backend APIs?

Yes, this approach applies to web applications, APIs, and services requiring secure user identity. It enforces token handling, secure storage, RBAC, and threat mitigation requirements across multiple components within these environments.

Why do I need token rotation and refresh handling?

Token rotation and refresh handling are needed to maintain secure sessions without requiring frequent logins. By issuing short-lived access tokens and utilizing a refresh mechanism, you mitigate the risk of token theft and enforce secure token management.

What are the limitations of JWT-based authentication?

JWT-based authentication limitations include managing token expiration and secure storage on the client side. You must implement proper refresh handling and threat mitigation patterns to prevent unauthorized token reuse across your application components.