@haatlabs-core/auth-contracts
v0.10.0
Published
Sign-in and API-key request and response schemas shared by an app's API and web pages.
Readme
@haatlabs-core/auth-contracts
The request and response schemas of sign-in and API keys, shared by an app's API and its
web pages: roles and their rank, the sign-in code's length and lifetime, and the me
response. An app adds its own me fields:
import { meResponseSchema } from '@haatlabs-core/auth-contracts';
export const MeResponseSchema = meResponseSchema({ features: AccountFeaturesSchema });zod is a peer: the app's own copy is used.
Install
pnpm add @haatlabs-core/auth-contractsIt leaves one package to your app, so the app holds one copy: zod.
