What problem does it solve?
It prevents breakage and security regressions when you need to change authentication and cryptography behavior in the CareCard auth utility package.
Core Features & Use Cases
- JWT primitives maintenance: Update JWT creation, verification, parsing, and service-to-service token formats (including header/payload timing semantics) with compatibility in mind.
- Password hashing compatibility: Preserve the HMAC-based hashing behavior and the saved password hash string format ($1$base64(algorithm)$base64(hash)$base64(salt)$), including salt handling.
- Crypto and key generation stability: Change signing/verification primitives and key pair generation (Ed25519 and RSA) while ensuring deterministic tests and strict error handling.
- Use Case: You’re modifying how JWTs or password hashes are produced/validated in @carecard/auth-util and must update exports and types while keeping consumer compatibility and test coverage.
Quick Start
Use this skill when asked to update pkg-auth-util authentication or cryptographic behavior, then implement the change with matching Mocha runtime tests and TypeScript declaration/type tests.