authentication-skill

Implement secure user authentication flows with JWT, bcrypt, CAPTCHA, and optional 2FA.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/Penitence1992/go-zero-backend-skills --skill authentication-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authentication-skill
Source: https://github.com/Penitence1992/go-zero-backend-skills/tree/main/skills/authentication-skill
Command: npx skills add https://github.com/Penitence1992/go-zero-backend-skills --skill authentication-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a robust framework for implementing secure user authentication flows, including login validation, password verification, CAPTCHA handling in production, user status checks, and JWT token generation and validation.

Core Features & Use Cases

  • Secure login validation with parameter checks, captcha support in production, user status checks, and bcrypt-based password verification.
  • Token-based authentication with JWT generation, validation, and a middleware example to protect API endpoints.
  • Optional Google 2FA support and configurable security measures such as login attempt throttling.

Quick Start

  • Integrate the provided LoginLogic flow into your authentication service.
  • Configure production CAPTCHA verification and token expiration as needed.
  • Protect APIs with the provided JWT middleware.

Frequently Asked Questions about authentication-skill

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

FAQPage Schema
How do I implement secure user authentication with JWT and bcrypt for a web application?

Secure user authentication uses bcrypt for password hashing and JWT for stateless token generation. This workflow validates login parameters, checks user status, and issues JWT tokens to manage sessions without server-side storage.

What's the best way to add CAPTCHA and rate limiting to a login endpoint?

Adding CAPTCHA and rate limiting to login endpoints prevents automated brute-force attacks. The authentication workflow supports configurable production CAPTCHA verification and throttles login attempts to secure the validation process.

How do I protect API routes using JWT middleware?

Protecting API routes with JWT middleware involves intercepting requests to validate the provided token. The workflow includes a middleware example that verifies JWT signatures and expiration before allowing access to protected endpoints.

Can I integrate Google 2FA into an existing password login flow?

Yes, Google 2FA integrates into existing password login flows as an optional security layer. The authentication workflow supports optional two-factor authentication alongside core password verification and JWT token generation.

What does a complete token-based authentication session management process look like?

Token-based session management issues a JWT upon successful login validation and password verification. The server validates this token on subsequent requests via middleware, handling expiration and ensuring secure API access.

Does this authentication workflow handle user status checks during login validation?

Yes, the login validation process explicitly includes user status checks. Before completing password verification with bcrypt and issuing JWT tokens, the workflow verifies the user account is active and valid.