Open-source auth SDK · v0.1.1

Stop rewriting authentication at the start of every project.

Production-grade auth for Indian apps — email OTP, PIN, session & device trust, and DPDP consent — dropped in with one line.

$ pip install bharatauth
Crafted in India 🇮🇳   Built for the World 🌎
The Why

Login is only 5% of authentication.

Every startup, freelancer, SaaS, and internal tool starts by rebuilding the same invisible machinery. BharatAuth ships it, so you don't rewrite it.

01

The part you always rebuild

Sessions, refresh-token rotation, rate limiting, brute-force lockout, device trust. The real work hides behind the login form — and it's the same work every project.

02

India-first by design

DPDP consent capture, audit trail, withdrawal and export are built in from day one — not bolted on after a compliance review.

03

Drops into FastAPI

Configure once, then mount a pre-built router — or call the domain modules directly. Managed mode creates its own tables; external mode never touches your user model.

04

Open source by purpose

MIT-licensed, on PyPI and GitHub, engineered by a team that has shipped production software for over two decades. Read the code before you trust it.

What's inside

The authentication toolkit, batteries included.

Every capability below ships in the installed package. Names map to real modules — nothing aspirational.

Email Verification

Verify users and prevent fake signups with OTP.

Password & PIN

Password login plus app-lock PIN set, verify & reset.

Sessions

Track, manage & revoke user sessions.

Refresh Tokens

Keep users logged in securely with rotation.

Rate Limiting

Protect your endpoints from abuse & IP blocks.

Device Trust

Session trust matrix & device fingerprinting.

Privacy Audit Trail

Immutable consent & audit trail records.

DPDP Ready

Privacy by design. DPDP-ready building blocks.

And more…

Built to extend. Read the modules on GitHub.

Quickstart

Configure once. Mount the router. Done.

Two ways to adopt: let BharatAuth manage its own tables, or plug into the user model you already have.

managed modepython
# new project — BharatAuth owns the tables
from bharatauth import configure

configure(
    mode="managed",
    secret_key="change-me-in-production",
    database_url="postgresql://…",
)

# creates ba_users, ba_sessions,
# ba_otp_tokens, ba_consent_log …
drop-in FastAPI routerpython
from fastapi import FastAPI
from bharatauth.fastapi_router import (
    router as auth_router,
)

app = FastAPI()
app.include_router(
    auth_router, prefix="/auth",
)

# /auth/login, /auth/otp, /auth/pin …
Read the full docs on GitHub ↗
Who builds it

A young SDK, standing on decades of engineering.

BharatAuth is a product of JamBuster Technologies — an engineering company that has shipped production software since 2004. The SDK was extracted from a real production system, not written as a demo.

That's the point of open source by purpose: the code is on GitHub and PyPI, MIT-licensed, for you to read, run, and trust before you adopt.

20+
years of shipping
production software
JamBuster Technologies ↗
Get in touch

Building with BharatAuth?

Whether you're integrating the SDK or want a custom, white-labelled build for your team or portfolio — reach the JamBuster engineering team directly.

Developers

Questions about the SDK, integration help, or contributing? Start on GitHub, or email the team.

dev@jambuster.in

White-label & custom builds

Need a tailored authentication build, or want to standardize auth across a portfolio? Let's talk.

services@jambuster.in