aim-auth-domain

Implement gRPC AuthService with JWT and Redis-backed refresh tokens.

4|Updated May 17, 2026
One-click install
npx skills add https://github.com/hellopoisonx/aim --skill aim-auth-domain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aim-auth-domain
Source: https://github.com/hellopoisonx/aim/tree/main/skills/aim-auth-domain
Command: npx skills add https://github.com/hellopoisonx/aim --skill aim-auth-domain

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

aim-auth-domain centralizes authentication logic for aim by defining the required data model, token behaviors, gRPC API contract, and service wiring so the rest of the system can rely on consistent, secure auth semantics.

Core Features & Use Cases

  • JWT AccessToken lifecycle: issue and refresh AccessTokens with TTL controlled by Token.AccessTTL, including using JWTIssuer with sharedjwt TTL management.
  • RefreshToken with Redis-backed session control: manage rotating UUID refresh tokens with explicit Redis keys and TTL rules to support secure token renewal and logout.
  • Multi-device login & logout semantics: support per-device logout (or global device logout) by mapping device_id to stored refresh/session records.
  • Operational integration: Nacos registration, Postgres + Redis usage, and RPC tracing configuration via OTel/Tempo to support production troubleshooting.
  • API and schema documentation: provide gRPC interface definitions and database planning to guide deterministic implementation and sqlc-based query generation.

Quick Start

Ask an AI assistant to generate a complete implementation plan for aim-auth-domain covering database schema, sqlc queries, JWT/refresh token flows, and AuthService gRPC method mappings based on references/schema.md and references/detail.md.

Frequently Asked Questions about aim-auth-domain

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

FAQPage Schema
How do I implement JWT AccessToken TTL control with Redis refresh tokens for a gRPC service?

JWT AccessToken TTL control with Redis refresh tokens is implemented by using JWTIssuer with sharedjwt NewManagerWithTTL for access tokens and storing rotating UUID refresh tokens in Redis with explicit keys and TTL rules.

What is the best way to handle multi-device login and logout in an online messaging system?

Multi-device login and logout in an online messaging system is handled by mapping device_id to stored refresh and session records, supporting both per-device logout and global device logout semantics.

How does gRPC AuthService integrate with PostgreSQL and sqlc for user authentication?

gRPC AuthService integrates with PostgreSQL by aligning the gRPC API with the database schema and using sqlc to generate deterministic queries for user registration, login, and token rotation operations.

Can I use Nacos and OTel for gRPC service registration and tracing in an authentication domain?

Nacos and OTel can be used for gRPC service registration and tracing in an authentication domain to support operational integration and production troubleshooting via Tempo configuration.

How do I design a database schema for an auth domain supporting refresh token rotation?

Designing a database schema for an auth domain with refresh token rotation involves planning PostgreSQL tables based on reference documentation and generating sqlc queries to manage user sessions and token lifecycle.