TypeScript Auth SDK for AI tool integration with the Noesis AIToolCenter platform. Current stable version is 0.1.3, released on npm. The SDK provides JWT validation with RS256 (JWKS) and HS256, OAuth2 PKCE flows, token introspection, refresh, and activation code redemption. Key differentiators: zero runtime dependencies beyond jose, Express middleware for drop-in auth, configurable timeouts, and automatic JWKS retry. Designed specifically for AI tool ecosystems where token payloads include entitlements and tool access.
npm install noesis-authNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Validates a JWT and sets up Express middleware for tool access authorization.
Always check token header for alg. Provide hs256Secret only if you intend to support symmetric JWT validation.
Pass a higher timeout value (e.g., 30000) to the AuthClient constructor: new AuthClient(url, 30000).
Always provide a valid toolId: app.get(..., auth.requireToolAccess('tool-123'), ...)Declare module augmentation: declare module 'express-serve-static-core' { interface Request { auth: TokenPayload } }Check result.token_refresh_required and update your stored access token with result.new_access_token.
Run `npm install jose` or ensure your package manager installs peer deps.
Import as named: `import { JWTValidator } from 'noesis-auth'`Refresh the token using the refreshToken method on AuthClient.
Check the JWKS URL is correct and accessible. Ensure the server is online.