Skip to content
Open source · Apache 2.0

The Auth Platform Native to Go. Built for Any Stack.

An open-source authentication platform you can embed in Go, or run as a standalone auth server.

  • Embed in Go

    Mount the handler in your own service and keep auth in process.

  • Run standalone

    Start one auth service for every app and language.

  • Your data stays in your database

    Authula uses the database, email and providers you already run.

Embed it. Or run it standalone.

The same authentication core, delivered two ways. Start with the model that fits your stack and keep your options open.

Library mode

Authula lives inside your Go application.

  • Auth runs in the same process as your app
  • No extra network hop for auth checks
  • Configure with typed Go options
  • Call core and plugin services directly from Go
  • Add or remove plugins when you build
Where it runs
Inside your Go process
How you configure it
In Go, with typed options
How you deploy it
Ship it with your app
Best for
Teams that already run a Go API

Standalone mode

Authula runs as its own authentication service.

  • One service for every frontend and backend
  • Update auth without redeploying your apps
  • Scale auth on its own
  • Keep auth code out of your application
  • Configure with a file and environment variables
Where it runs
As its own service
How you configure it
A config file and environment variables
How you deploy it
The official container image
Best for
Apps in any language that need one auth service

Both modes share the same plugins, routes and APIs.

One auth layer. Your infrastructure.

Authula handles the authentication flow. Your users, data and providers stay under your control.

  • Your users

    Accounts, sessions and profiles stay in your database, under your schema.

  • Your data

    Authula reads and writes through the database you already run and back up.

  • Your providers

    Email, OAuth and storage connect with credentials you control.

  1. Clients

    Web, mobile or backend apps

  2. Authula

    Sign-in, sessions and access checks

  3. Your infrastructure

    Your database, email and OAuth providers

Library mode runs Authula inside your Go process. Standalone mode runs the same core as its own service.

Everything you need. Nothing you don't.

Enable the capabilities your product needs and leave the rest out of the build.

Sign-in flow4 steps

A complete sign-in flow

  1. 01
    Create account

    The user signs up with an email and password, or an OAuth provider.

  2. 02
    Verify email

    Authula sends a link and confirms the address before sign-in.

  3. 03
    Session issued

    The user gets a session cookie and a refresh token.

  4. 04
    Load current user

    Your app reads the signed-in user and claims from the request.

Sign-in

  • Email & password

    Argon2 hashing, verification, reset and email-change flows.

  • OAuth2

    GitHub, Google and Discord, with an extensible provider API.

  • Magic links

    Passwordless sign-in with expiring email links.

  • Email verification & reset

    Expiring tokens and transactional email templates.

Sessions & tokens

  • Cookie sessions

    HTTP-only cookies, sliding renewal and automatic cleanup.

  • JWT + JWKS

    Key rotation, refresh tokens and a public JWKS endpoint.

  • Bearer auth

    Validate JWT access tokens from the Authorization header.

  • API keys

    Scoped, expiring keys with per-key rate limits.

Security & access

  • TOTP & backup codes

    Authenticator-app 2FA with recovery codes and trusted devices.

  • CSRF

    Double-submit cookie protection on state-changing requests.

  • Rate limiting

    Per-route rules with memory, Redis or database storage.

  • RBAC

    Roles, permissions and weighted role hierarchy.

  • Admin operations

    User, account and session management with audit trails.

Platform

  • Organizations & teams

    Multi-tenant orgs, members, teams and invitations.

  • Secondary storage

    Redis, database or in-memory storage for high-churn data.

  • Event bus

    GoChannel, Redis, Kafka, NATS, RabbitMQ, PostgreSQL or SQLite.

  • Custom routes & webhooks

    Register routes or trigger async work from hooks.

Extend the core without forking it.

A small Go interface gives plugins routes, hooks, migrations and shared services. Add what you need and keep the core untouched.

PluginsCompiled into the binary
  • Auth method
  • Token issuer
  • Session store
  • Data adapter
Authula core

Shared services, hooks and migrations

  • Request guard
  • Access policy
  • Custom route
  • Your plugin

Plugins register their routes, hooks and migrations with the core. Add your own without forking it.

  • Runs in process

    Plugins start with the core and share its database, logger and event bus.

  • Shared services

    Plugins offer capabilities to each other and to your application.

  • Dependencies stay explicit

    Declare what a plugin needs and Authula starts things in the right order.

  • Your endpoints

    A plugin can add routes, middleware and background work.

How a plugin connects

4 steps
  1. 01

    Implement the interface

    Write a Go type that matches the plugin interface.

  2. 02

    Declare dependencies

    List the plugins and migrations your plugin needs.

  3. 03

    Register the plugin

    Add it to the plugin list when you build Authula.

  4. 04

    Authula connects it

    Routes, hooks and migrations are wired into the core.

Integrations

OAuth2 providers, ready to connect.

Discord, GitHub and Google are built in. Connect any OAuth2 or OIDC provider with your own endpoints and field mappings.

Built in

Custom OAuth2 / OIDC

Okta, Microsoft Entra ID, Auth0, Keycloak and GitLab use the custom provider config. Any provider with an authorization-code flow works the same way.

Feels like Go.

No runtime, no generated client, no new mental model. The APIs feel like the rest of your Go code.

Request lifecycle04 steps
  1. Request arrives

    A request hits a route protected by Authula.

  2. Session is checked

    Authula reads the cookie or bearer token and verifies it.

  3. Your handler runs

    The signed-in user and claims are ready in the request context.

  4. Response leaves

    Authula can refresh the session, add headers or record an event.

In practice04
  • Typed user context

    Read the signed-in user and claims without type assertions.

  • Middleware that composes

    Protect routes with middleware that fits your existing handler chain.

  • Direct Go APIs

    Manage users and sessions from Go when HTTP is not the right tool.

  • Config in code

    Keep auth settings in Go and catch mistakes when you build.

Adaptersnet/httpChiEchoFiber
Read the integration guide

Built for production, not a demo.

Data, observability and deployment surfaces you can reason about—without a second control plane.

Data & state

Point Authula at your database; migrations run on startup.

  • SQLite, PostgreSQL and MySQL
  • Automatic core and plugin migrations

Observability

Export traces and metrics to the collector you already run.

  • OpenTelemetry traces
  • Metrics via OTLP
  • Optional log export

Deployment

Binary

Run Authula as a single Go binary on your own infrastructure.

Container

Deploy the official container image with your config and environment.

Kubernetes

Scale auth alongside your services using the same container image.

Operate auth like the rest of your stack.

From install to authenticated.

Install the module, choose a deployment path and start the service. The docs cover the rest.

  1. Install the module

    Add Authula to your Go module.

    shell
    $ go get github.com/Authula/authula
  2. Choose library or standalone

    Embed it in your Go app or run it as its own service.

    Open the setup guide
  3. Start the service

    Start the binary or official image with your database and environment. Migrations run on startup.

Licensed under Apache 2.0.

Built in the open.

Authula is Apache-2.0 and developed in public. Ask questions, report what breaks, or bring a plugin idea.

Occasional updates about releases. No noise.

Need to talk? Contact us.

Released under the Apache 2.0 License.