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:
- A super admin account is created automatically
- A password reset email is sent (or logged to console in dev)
- Navigate to
https://your-authvital.com/admin - Click "Reset Password" and check your email
- Set a strong password
- Enable MFA immediately
Accessing Admin Panel¶
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¶
- Go to Applications → Create New
- 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 |
- Save to generate
client_id(andclient_secretfor 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.
- Go to Applications → select the application
- Scroll to the Danger Zone at the bottom
- Click Disable Application
- 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¶
- Go to Application → Licenses tab
- Click Add License Type
- 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¶
- Go to Tenants → Create New
- Fill in:
- Name: "Acme Corporation"
- Slug:
acme-corp(auto-generated if blank) - 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:
- Go to Settings → SSO
- Select provider (Google or Microsoft)
- Enter OAuth credentials
- 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:
- Go to Settings → API Keys
- Click Create Key
- Name it (e.g., "CI/CD Pipeline")
- Set permissions and expiration
- 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:
- Go to Settings → Webhooks
- Click Add Webhook
- Configure:
| Field | Description |
|---|---|
| Name | Webhook identifier |
| URL | Endpoint to POST to |
| Secret | For HMAC signature |
| Events | Events to subscribe to |
Available Events¶
subject.*- User lifecyclemember.*- Membership changesinvite.*- Invitation eventslicense.*- License assignmentsapp_access.*- App access changes
Managing Super Admins¶
Creating Another Super Admin¶
- Go to Settings → Accounts
- Click Add Super Admin
- Enter email address
- 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¶
- Go to Settings → Accounts
- Find the admin
- 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 Settings → Audit Log
Security Best Practices¶
✅ Do¶
- Enable MFA - All super admins should use MFA
- Use strong passwords - 16+ characters, unique
- Limit super admins - Only those who need it
- Review access regularly - Audit who has admin access
- Use API keys carefully - Set expiration, minimum permissions
❌ Don't¶
- Don't share credentials - Each admin gets own account
- Don't skip MFA - Even for "just testing"
- Don't use production admin for dev - Separate environments
- 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:
- Ask another super admin to reset your password or disable your MFA
- Use the CLI recovery tool (recommended for self-recovery)
CLI Recovery Tool (Recommended)¶
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:
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:
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:
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:
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.