OAuth 2.1 and OpenID Connect
- Authorization code flow, PKCE (
S256) required by default - Refresh tokens rotated on every use, with reuse detection
- Discovery, JWKS,
/userinfo, RP-initiated logout - An issuer per login host
pre-1.0 Open source · MIT · Go
An open-source OAuth 2.1 and OpenID Connect identity provider. Deploy it to your AWS account. Pay for what you use. Manage nothing but your application.
# clone, then ask Claude Code to deploy it
$ git clone https://github.com/litelogin/litelogin
$ cd litelogin
$ claude "Deploy LiteLogin to prod with my
litelogin-prod AWS profile, using login.example.com"
# it confirms the account, gives you the NS records
# and shows every plan before applying it
# then create an org and an app
$ claude "Create an org called Acme with a client
for https://app.acme.com/callback"
# you get an issuer URL, a client ID and a secret
LiteLogin isn't an auth API in front of someone else's identity service, and it isn't a conventional identity server squeezed into a container. Every request is handled by a Lambda function, and all state lives in two on-demand DynamoDB tables.
Most identity providers hide their infrastructure behind an abstraction. LiteLogin's is a handful of AWS services you can read, audit and reason about, all deployed into your account by one set of OpenTofu/Terraform modules.
CloudFront terminates TLS for every login host and custom domain. WAF rate-limits per IP and applies AWS managed rules. A secret origin header means the Lambda can't be called around the WAF.
The Auth Lambda serves every browser and OIDC endpoint. Administration is a separate Lambda behind IAM, so management is never reachable from a login host. Background work runs from DynamoDB Streams, SQS and EventBridge.
Two on-demand DynamoDB tables, with every access pattern documented. Signing keys are created in KMS and never leave it. Besides requests, only key rotation and a reconciler ever run.
Standards-based, so any OpenID Connect library works: point it at the issuer and it discovers the rest through /.well-known/openid-configuration.
S256) required by default/userinfo, RP-initiated logoutacme.login.example.comlogin.acme.com, with managed certificates-o jsonYour identity provider, in your AWS account, without the identity server.
| Self-hosted identity server | LiteLogin | Managed auth service | |
|---|---|---|---|
| Runs in | Your containers or VMs | Your AWS account, on Lambda | The vendor's cloud |
| Database | Usually PostgreSQL you operate | On-demand DynamoDB | Theirs |
| Idle compute cost | Always-on | Near zero | Per-user or per-tier pricing |
| Servers to patch | Yes | No | No |
| Source and data | Yours | Yours, MIT-licensed | Vendor's |
| Portability | Any cloud | AWS only | Vendor only |
A small fixed monthly cost for WAF, KMS keys and monitoring, then a fraction of a cent per sign-in. Every number below is derived step by step, from measured DynamoDB units, KMS calls and Lambda duration, in Cost.md.
| Sign-ins a month | Lean | Full |
|---|---|---|
| 1,000 | $4.60 | $21.02 |
| 10,000 | $6.05 | $23.43 |
| 50,000 | $12.50 | $34.20 |
| 100,000 | — | $47.66 |
| 1,000,000 | — | $231.01 |
Uses CloudFront's free flat-rate plan, which includes the distribution, WAF and DNS zone. Default login hosts only, lighter monitoring, and tables encrypted with DynamoDB's own key. Fixed cost about $4.44 a month.
Custom login domains, edge caching for discovery and JWKS, stricter WAF rules on credential endpoints, tables encrypted with a KMS key of your own, X-Ray, a dashboard and 15 alarms. Fixed cost about $20.74 a month.
Prices checked 2026-11-12, before AWS's free tier and taxes. Past roughly 100,000 sign-ins a month, requests dominate the bill, and refreshes cost more than sign-ins.
50 sign-ins and 200 token refreshes per second for five minutes, through CloudFront, on a real deployment. No errors, no skipped arrivals, and no KMS, DynamoDB or Lambda throttling. Method and results.
You need an AWS account used only for LiteLogin, a domain you can delegate to Route 53 (such as login.example.com), OpenTofu or Terraform, Go and the AWS CLI. The first deploy takes about 30 minutes, mostly waiting for the certificate and CloudFront.
The easiest way to deploy is with Claude Code. The litelogin skill in the repository runs scripts/deploy.sh and brings you each decision: it shows the AWS account for you to confirm, gives you the NS records to add and checks the delegation, and summarizes every plan before applying exactly that plan. It names the AWS profile on every command, never falls back to the default one, and asks before anything destructive. When it's done, it runs litelogin status to check the deployment.
git clone https://github.com/litelogin/litelogin && cd litelogin
claude "Deploy LiteLogin to prod with my litelogin-prod AWS profile, using login.example.com"Ask Claude Code for the org and its first app. It runs litelogin init and gives you an issuer URL, a client ID and a client secret.
claude "Create an org called Acme with a client for https://app.acme.com/callback"Point any OpenID Connect library at the issuer: it finds the rest through discovery. To check the whole flow first, ask Claude Code. It runs litelogin client test, which opens your browser to sign in as your app would, then checks the code exchange, the ID token, /userinfo and a refresh.
claude "Test a sign-in with the Acme Portal client"deploy.sh and the litelogin CLI do the same steps from your terminal. If deploy.sh stops, run it again: it continues where it left off. The same command upgrades later.
AWS_PROFILE=<your profile> \
scripts/deploy.sh prod --domain login.example.com
dist/litelogin init --org "Acme" \
--client "Acme Portal" \
--redirect-uri https://app.acme.com/callbackSelfHosting.md has every step in full, including doing it all by hand.
No AWS account needed. With Go and Docker, run LiteLogin against DynamoDB Local, then sign in with a password and a passkey. It takes about ten minutes.
make local-up local-tables
make run-auth # terminal 1
make run-admin # terminal 2Local.md walks you through it.
You'd be trusting LiteLogin with your users' credentials, so its design decisions, threats and accepted risks are all written down.
Assets, trust boundaries, and each control checked against the code, with accepted risks and gaps called out.
Request routing, revocation guarantees, key rotation and why each AWS service was chosen.
How to report a vulnerability. LiteLogin hasn't had an external penetration test yet.
LiteLogin is pre-1.0: feature-complete for sign-in and load-tested, but expect breaking changes before 1.0. Here's what it doesn't do yet.
Want to help with any of these? CONTRIBUTING.md covers building, testing and the code layout.
MIT-licensed, written in Go, deployed by OpenTofu or Terraform into your own AWS account.