Umbral
Back to plugin directory
UA

Umbral Auth

Official Featured by Umbral contributors

users, groups, login routes, argon2, reset flows

official stable

About

Every app hits the same wall on day two: who is this request, and are they allowed? Umbral Auth answers it out of the box — a battle-tested AuthUser model, groups, argon2 password hashing with sane defaults, opaque DB-backed API tokens, and password-reset flows. Its LoggedIn<T> extractor turns "is the caller authenticated?" into a function argument the compiler enforces: a handler that takes LoggedIn<AuthUser> simply cannot run for an anonymous request.

Install

cargo add umbral-auth
cargo add umbral-sessions   # auth needs a place to keep the session

Wire it up

use umbral::prelude::*;
use umbral_auth::{AuthPlugin, AuthUser};
use umbral_sessions::SessionsPlugin;

let app = App::builder()
    .database("default", pool)
    .plugin(SessionsPlugin::default())
    .plugin(
        AuthPlugin::<AuthUser>::default()
            .with_default_routes()        // /login, /logout, /signup
            .with_user_in_templates(),    // `user` available in every template
    )
    .build()?;

Target: lock a route to signed-in users

The extractor is the gate. If it can't build an authenticated user, the handler never runs.

use umbral_auth::{LoggedIn, AuthUser};

async fn dashboard(user: LoggedIn<AuthUser>) -> Html<String> {
    Html(format!("Welcome back, {}", user.username))
}

What you get

  • AuthUser + groups/roles, ready to migrate
  • Argon2 password hashing (drop-in from bcrypt without surprises)
  • Opaque, hashed-at-rest bearer tokens for API clients
  • LoggedIn<T> / login_required_html("/login") guards
  • Token-based password reset (email delivery via umbral-email)
  • Pairs with umbral-oauth for Google / GitHub social login

Usage

Pair with `SessionsPlugin` (auth stores its session there). `with_default_routes()` mounts /login, /logout and /signup; `with_user_in_templates()` injects `user` into every template so your base layout's nav can branch on `user.is_authenticated`.

plugin setup
cargo add umbral-auth

Feature tracker

Per-feature shipping status, recorded in the directory.

10 of 11 shipped
User and group models shipped Stable

Built-in AuthUser plus groups and roles.

Argon2 password hashing shipped Stable

Modern password hashing with sensible defaults.

Permissions and RBAC shipped Stable

Group/permission M2M checks via umbral-permissions.

Bearer tokens shipped Stable

Opaque DB-backed API tokens, hashed at rest.

Default auth routes shipped Stable

Login, logout, signup, and route guards for HTML apps.

Password reset shipped Beta

Token-based reset flow with email action throttling.

OAuth / social login shipped Beta

Sign in with Google/GitHub and connect accounts (umbral-oauth).

Email verification shipped Beta

Verification-code lifecycle and require-verified route guards.

Form and JSON surfaces shipped Beta

HTML auth forms and JSON-friendly handlers for API clients.

Custom user models usable Beta

Typed plugin support for swapping the auth user model.

SSO / OIDC planned Design

Enterprise single sign-on provider support.

Compatibility

Declared support per Umbral version and database backend.

No compatibility rows declared yet.

Community notes

1 note in the discussion thread.

AN
Anonymous
usage note · Jul 9, 2026
usage

argon2 defaults are sensible — migrated off bcrypt without surprises.

Reported issues

Bugs and abuse reports filed against this plugin.

Report an issue

No open issues

No issues have been reported against this plugin. Track upstream bugs on the maintainer's tracker, or report a directory problem to the Umbral team.