Skip to content

Super Admin Guide

Managing your AuthVital instance as a super administrator.

Overview

Super Admins have full control over the AuthVital instance:

  • Manage applications and OAuth clients
  • Configure instance-wide settings
  • Create and manage tenants
  • View all users across tenants
  • Configure SSO providers
  • Manage system webhooks
  • Create other super admins

First Login

Initial Setup

When AuthVital starts with SUPER_ADMIN_EMAIL configured:

  1. A super admin account is created automatically
  2. A password reset email is sent (or logged to console in dev)
  3. Navigate to https://your-authvital.com/admin
  4. Click "Reset Password" and check your email
  5. Set a strong password
  6. Enable MFA immediately

Accessing Admin Panel

https://your-authvital.com/admin

Login with your super admin credentials. If MFA is required, you'll be prompted for a TOTP code.

Dashboard

The admin dashboard shows:

  • Instance Stats: Total users, tenants, applications
  • Recent Activity: Latest signups, logins, events
  • System Health: Database status, API health

Managing Applications

Creating an Application

  1. Go to ApplicationsCreate New
  2. Configure:
Field Description
Name Display name (shown on login)
Slug URL-safe identifier
Type SPA (browser) or MACHINE (server-to-server)
Redirect URIs OAuth callback URLs
Post-Logout URIs Where to redirect after logout
  1. Save to generate client_id (and client_secret for MACHINE type)

Application Settings

Tab Purpose
General Name, description, type
OAuth Redirect URIs, token TTLs
Branding Logo, colors, links
Roles Define application roles
Licensing Configure license types and modes
Access Control who can access the app
Webhooks Per-app webhook configuration

Disabling an Application

Disabling an application prevents all new logins and revokes active sessions, but preserves all configuration and data.

  1. Go to Applications → select the application
  2. Scroll to the Danger Zone at the bottom
  3. Click Disable Application
  4. Confirm in the modal

What happens when you disable:

Effect Details
Active sessions revoked All refresh tokens are immediately revoked
New logins blocked OAuth authorization requests are rejected
Data preserved Roles, license types, subscriptions, and configuration remain intact
Webhooks paused Per-app webhook delivery stops

To re-enable, click Enable Application in the same Danger Zone section.

Deleting an Application

⚠️ This action is irreversible. Deleting an application permanently removes it and all associated data.

Prerequisites: - The application must be disabled first (the Delete button is locked while active)

Steps: 1. Disable the application first (see above) 2. In the Danger Zone, click Delete Application 3. Type the application name to confirm 4. Click Delete Application

What gets deleted:

Data Cascade behavior
Application record Permanently removed
OAuth credentials Client ID and secret destroyed
Roles & permissions All application roles deleted
License types All license type definitions deleted
Subscriptions All tenant subscriptions removed
Access grants All user app-access records removed
Auth codes & tokens All authorization codes and refresh tokens deleted

A application.deleted webhook event is dispatched to all configured system webhooks before final deletion.

Licensing Modes

Mode Use Case
FREE Free products, all users get access
PER_SEAT Traditional SaaS licensing
TENANT_WIDE Team subscriptions

Creating License Types

  1. Go to ApplicationLicenses tab
  2. Click Add License Type
  3. Configure:
{
  name: "Pro Plan",
  slug: "pro",
  description: "For growing teams",
  features: {
    "api-access": true,
    "advanced-reports": true,
    "sso": false,
    "audit-logs": false,
  },
  displayOrder: 2,
}

Managing Tenants

Viewing Tenants

Tenants page shows all organizations:

  • Name and slug
  • Member count
  • Created date
  • Status

Creating a Tenant

  1. Go to TenantsCreate New
  2. Fill in:
  3. Name: "Acme Corporation"
  4. Slug: acme-corp (auto-generated if blank)
  5. Optionally assign initial owner

Tenant Details

Click a tenant to see:

Tab Content
Overview Stats, quick actions
Members Users in this tenant
Domains Verified email domains
Subscriptions License subscriptions
SSO Tenant-specific SSO config
Settings MFA policy, settings

Managing Members

From tenant details → Members:

  • Invite: Send invitation to email
  • Change Role: Owner, Admin, or Member
  • Suspend: Temporarily disable access
  • Remove: Remove from tenant

Managing Users

User List

Users page shows all users across tenants:

  • Email and name
  • Email verification status
  • MFA status
  • Tenant memberships

User Details

Click a user to see:

  • Profile information
  • Tenant memberships
  • Active sessions
  • License assignments
  • SSO links

Admin Actions

Action Use
Reset Password Send password reset email
Disable MFA Emergency MFA removal
Deactivate Disable account
Delete Permanently remove user

Instance Settings

General Settings

Setting Description
Instance Name Display name for your IDP
Sign-up Allowed Allow public registration
Auto-Create Tenant Create tenant for new signups
Generic Domains Allow gmail.com, etc.
Single-Tenant Mode Restrict to one tenant

Branding

Configure default branding for login pages:

  • Logo and icon URLs
  • Primary and accent colors
  • Background color/gradient
  • Support, privacy, terms links

Security Settings

Setting Description
Super Admin MFA Required Force MFA for all super admins
Default MFA Policy Default for new tenants

SSO Configuration

Instance-Level SSO

Configure SSO providers available to all tenants:

  1. Go to SettingsSSO
  2. Select provider (Google or Microsoft)
  3. Enter OAuth credentials
  4. Configure options:
Option Description
Enabled Activate this provider
Client ID OAuth client ID
Client Secret OAuth client secret
Allowed Domains Restrict to email domains
Auto-Create User Create new users from SSO
Auto-Link Existing Link SSO to existing accounts

Testing SSO

After configuration: 1. Log out of admin panel 2. Go to regular login page 3. Click "Sign in with Google/Microsoft" 4. Verify the flow works

API Keys

Instance API Keys

Create API keys for programmatic instance access:

  1. Go to SettingsAPI Keys
  2. Click Create Key
  3. Name it (e.g., "CI/CD Pipeline")
  4. Set permissions and expiration
  5. Copy the key immediately (shown only once!)

Key Permissions

Permission Allows
instance:* Full instance access
instance:users:read Read user data
instance:tenants:* Manage all tenants
instance:applications:* Manage applications

System Webhooks

Configure webhooks for system-wide events:

  1. Go to SettingsWebhooks
  2. Click Add Webhook
  3. Configure:
Field Description
Name Webhook identifier
URL Endpoint to POST to
Secret For HMAC signature
Events Events to subscribe to

Available Events

  • subject.* - User lifecycle
  • member.* - Membership changes
  • invite.* - Invitation events
  • license.* - License assignments
  • app_access.* - App access changes

Managing Super Admins

Creating Another Super Admin

  1. Go to SettingsAccounts
  2. Click Add Super Admin
  3. Enter email address
  4. New admin receives password reset email

Super Admin Permissions

All super admins have equal permissions. There's no hierarchy - any super admin can:

  • Create/delete other super admins
  • Modify all settings
  • Access all data

Removing a Super Admin

  1. Go to SettingsAccounts
  2. Find the admin
  3. Click Deactivate or Delete

⚠️ Cannot delete the last super admin!

Audit Logs

Super admin actions are logged:

  • Login/logout events
  • Configuration changes
  • User management actions
  • Tenant modifications

View at SettingsAudit Log

Security Best Practices

✅ Do

  1. Enable MFA - All super admins should use MFA
  2. Use strong passwords - 16+ characters, unique
  3. Limit super admins - Only those who need it
  4. Review access regularly - Audit who has admin access
  5. Use API keys carefully - Set expiration, minimum permissions

❌ Don't

  1. Don't share credentials - Each admin gets own account
  2. Don't skip MFA - Even for "just testing"
  3. Don't use production admin for dev - Separate environments
  4. Don't leave sessions open - Log out when done

Troubleshooting

Emergency Recovery

If you're locked out of your super admin account, use these recovery options in order:

  1. Ask another super admin to reset your password or disable your MFA
  2. Use the CLI recovery tool (recommended for self-recovery)

AuthVital includes a secure CLI tool for emergency admin recovery. This is the preferred method when another super admin isn't available.

Reset Password

Generate a new temporary password:

pnpm recover-admin reset-password --email admin@example.com

This will: - Generate a secure temporary password - Set must_change_password = true (forces password change on next login) - Log the action to the audit trail - Display the temporary password in the terminal

Disable MFA

Remove MFA from a locked-out account:

pnpm recover-admin disable-mfa --email admin@example.com

This will: - Disable MFA on the account - Clear the MFA secret and backup codes - Log the action to the audit trail

Re-enable MFA immediately

After regaining access, enable MFA again right away. Don't leave your account unprotected!

Unlock Account

Unlock an account that's been locked due to failed login attempts:

pnpm recover-admin unlock-account --email admin@example.com

This will: - Reset the failed login counter - Clear any account lockout - Log the action to the audit trail

CLI Options

Flag Description
--email Email of the super admin account
--reason Optional reason for audit log
--force Skip confirmation prompt

Example with reason:

pnpm recover-admin reset-password --email admin@example.com --reason "Lost phone with MFA app"

Direct Database Access

Direct database access is no longer documented

Direct database access is no longer documented. Use the CLI recovery tool instead.

The CLI tool (pnpm recover-admin) provides safe, audited recovery for all emergency scenarios including password resets, MFA removal, and account unlocking.