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.