Integration Starter Kit: OAuth 2.0, Token Refresh & Retries by Astha P ShuklaIntegration Starter Kit: OAuth 2.0, Token Refresh & Retries by Astha P Shukla

Integration Starter Kit: OAuth 2.0, Token Refresh & Retries

Portfolio project
Astha P Shukla
Every API integration needs the same plumbing, and that is where most of them break: expired tokens, two requests refreshing at once, rate limits, and secrets stored in plain text. This open-source Node.js + TypeScript kit gets that plumbing right once, with tests.
What's inside: OAuth 2.0 with CSRF state check and optional PKCE. Tokens encrypted with AES-256-GCM, bound to each tenant, with key rotation. Race-free token refresh: a per-tenant lock means ten parallel requests trigger exactly one refresh. An API client that refreshes once on 401, backs off on 429 and 5xx, honours Retry-After, and fails fast on real errors. Per-tenant rate limiting with atomic Redis counters.
31 tests run with no accounts or Redis needed. HubSpot is the example provider, and it works with Shopify, Microsoft or any OAuth 2.0 API. Stack: Node.js 20, TypeScript, Express, Redis, Docker. Code: github.com/asthapandey06/integration-starter-kit

0 likes · 0 views · Nov 1, 2026

Open-source Node.js/TypeScript kit for safe API integrations: OAuth 2.0, encrypted tokens, race-free refresh, retries and rate limits. 31 tests.

Tags