InfrastructureGPL-3.0

AuthService

Self-hosted identity provider for every application you operate

AuthService is a self-hosted OAuth 2.1 and OIDC identity provider built on BetterAuth. It centralizes sign-in, per-application roles, MFA, organizations, subscription billing and a prepaid credit wallet for the applications your organization runs.

Open SourceOAuth 2.1OIDCBetterAuthVue 3PostgreSQLDocker

Overview

Identity as shared infrastructure

Once an organisation runs more than a handful of applications, identity fragments. Each service grows its own account table, its own password reset, its own idea of what two-factor authentication means. Users accumulate credentials, administrators lose the inventory, and every new product repeats the same integration work. The cost is not only duplicated code: it is the absence of a single, auditable answer to who can reach what, from which application, and under which subscription.

AuthService replaces that sprawl with one OAuth 2.1 and OIDC authorization server, self-hosted next to your own services. Applications register as OAuth clients with their own redirect URIs, scopes and consent policy. Sign-in, sessions and second factors live in one place, and the resulting JWT carries the claims each backend needs. Discovery and JWKS endpoints let standard libraries validate tokens locally, without a callback to the provider on every request.

Access control is per application: roles, permissions and plans belong to a client, and a user may be an editor in one product and a reader in another. The same token can expose feature flags, an organization identifier and a wallet balance. Consumption counters, an accounting journal and a prepaid euro wallet cover metered usage, while an optional LiteLLM gateway extends the model to language-model and MCP calls.

You run the service, the PostgreSQL database and the signing keys; no third-party identity provider sits in the critical path. Startup migrations, structured logs, health checks, rate limiting and published container images make it an operational component rather than a prototype. The default posture is fail-closed: unknown OAuth clients are rejected, administrative privileges are hierarchical, and a failed authorization never degrades into open access.

OAuth 2.1

Authorization code, client credentials, discovery

MFA

TOTP, passkeys, backup codes

RBAC

Roles and permissions per application

Self-hosted

Your database, your signing keys

Capabilities

What it does

What the product does, and the problems it removes from your workflow.

01

Standards-based authorization server

Authorization code with PKCE, client credentials, refresh token rotation, discovery, JWKS and optional device grant. Standard OIDC libraries can verify tokens directly against the published key set.

02

Per-application RBAC

Each OAuth client owns its roles and permissions, so a user can be administrator in one product and guest in another. Granted roles travel in the JWT, without a provider round-trip.

03

MFA you can enforce

TOTP, backup codes and WebAuthn passkeys are managed from one security page. MFA can be required per application, and token issuance is refused until the account has enrolled a second factor.

04

Multi-tenant organizations

Owner, admin and member roles, email invitations and a selectable active organization. When the org scope is requested, the access token carries an org_id claim that backends use to isolate tenant data.

05

Plans, flags and metering

Subscription plans carry feature flags that travel in access tokens, while a scoped API records numeric consumption counters per user and application. Stripe products and prices are created automatically through an idempotent webhook handler.

06

Prepaid credit wallet

One euro balance per user, shared by every application. Stripe top-ups or manual invoices feed an append-only ledger, and per-application spend statistics show where the credit goes.

07

Operational admin console

A Vue 3 admin console covers users, applications, plans, roles, organizations, wallets, accounting and runtime configuration. It ships in English and French, with optional public landing page and instance branding.

08

Optional LiteLLM gateway

A bundled LiteLLM proxy accepts AuthService access tokens, checks the wallet before each model or MCP call and bills the provider cost afterwards. Its admin interface signs in through AuthService.

Interfaces

Inside the product

A look at the screens and surfaces you will work with every day.

Admin dashboard showing online users, active sessions, applications, organizations, a login chart and credit totals
01 / 05

The dashboard answers at a glance how many users are connected, which applications they use and how much credit the instance holds.

Registered OAuth applications displayed as cards with status, client type, MFA requirement and seven-day login activity
02 / 05

Each card is an OAuth client; client type, MFA policy and redirect count are readable before opening it.

User table with global role, application access, last login, verification and MFA status
03 / 05

Account state is auditable from the list itself: global role, application access, last sign-in and second factor.

Wallet page with credit held, user debt, spend, exchange rate and margin, spend breakdown and top consumers
04 / 05

Credit, pricing and consumption sit on one page, so an administrator can see who spends and at which exchange rate.

Runtime configuration page with MFA adoption, platform counts, social providers, Stripe status and compatibility profile
05 / 05

The page exposes the effective runtime state: enabled providers, MFA coverage, billing connection and active compatibility profile.

Partnership

Need this capability in your stack

We adapt, integrate and operate our products within exclusive partnerships. Tell us what your teams need.

Talk to us