MASHRUF
M.
Back to Projects

Home → Projects → AuthKit Microservice

AuthKit Microservice

NestJSPostgreSQLRedisPassport.jsDocker
AuthKit Microservice

Overview

AuthKit is a drop-in authentication microservice covering JWT, OAuth2, magic links, and refresh token rotation, with Redis-backed rate limiting and a clean admin API.

TypeMicroservice
RoleBackend Engineer
Timeline3 weeks
StatusDemo
GitHubgithub.com/mashruf
LiveComing soon

Technology Stack

NestJS
PostgreSQL
Redis
Passport.js
Docker

Key Features

JWT + Refresh Rotation

Short-lived access tokens with rotating refresh.

OAuth2 Providers

Google, GitHub, Apple, and custom OIDC out of the box.

Rate Limiting

Per-IP and per-user limits backed by Redis.

Magic Links

Passwordless email flows with branded templates.

Audit Log

Every auth event recorded for compliance.

Admin API

Manage users, sessions, and roles via REST.

Challenges & Solutions

Token Revocation

Problem · Logged-out tokens stayed valid until expiry.

Solution · Added a Redis denylist checked on every request.

Brute Force

Problem · Login was open to credential stuffing.

Solution · IP + identifier sliding-window limiter with captcha fallback.

More Projects

Keep exploring

All Projects