Skip to content

Vendidit/auth-shared

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@vendidit/auth-shared

📚 Full documentation: docs.auth.vendidit.com

Cross-cutting TypeScript types for every consumer of @vendidit/auth-server. One contract, every TS consumer — @vendidit/auth-client, @vendidit/auth-server-ts, and @vendidit/auth-server-nest all re-export from here.

Repository: Vendidit/auth-shared

What's inside

  • JWT claim shapesUserJwtPayload, ServiceJwtPayload, RefreshJwtPayload, AccessJwtPayload, plus ImpersonationClaims, PasswordResetClaims, EmailVerificationClaims.
  • Normalized principal typesAuthenticatedUser, ServicePrincipal, AuthPrincipal.
  • Wire DTOsUser, Organization, MyOrgRecord, TokenPair, AuthResponse, SessionRecord, AuditLogEntry, …
  • Error envelope + codesAuthErrorCode, AuthErrorEnvelope, AuthErrorPayload.
  • Constants — role codes, token-type constants.

Install

Track main (current convention for in-org consumers — auto-picks up the latest shape every npm install):

npm install github:Vendidit/auth-shared

Or pin to a tag if you want reproducible installs:

npm install github:Vendidit/auth-shared#v0.1.0

npm clones the repo and uses the committed dist/ directly — no build step on the consumer side.

Subpath exports

import type { UserJwtPayload } from '@vendidit/auth-shared/jwt';
import type { User, Organization } from '@vendidit/auth-shared/dto';
import { AuthErrorCode } from '@vendidit/auth-shared/errors';
import { ROLES, TOKEN_TYPES } from '@vendidit/auth-shared/constants';

See the full type reference on the docs site.

About

Shared TypeScript types for @vendidit/auth-server consumers — JWT claim shapes, principals, wire DTOs, error codes. One contract, every TS consumer.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors