Skip to main content

Authentication & Login

This page explains how to sign in to the Ledgerline Admin Panel and what to do if you run into trouble.

Prerequisites

  • Admin-level access to the Ledgerline instance.
  • A Discord account (for Discord OAuth login) or a local username and password (if local auth is enabled).

Signing In with Discord (Default)

Discord OAuth is the default login method. When you navigate to the admin panel, you will be redirected to Discord to authorize access.

  1. Open the admin panel URL (e.g., https://your-domain.com/admin).
  2. You are redirected to Discord's authorization page.
  3. Click Authorize to grant Ledgerline access to your Discord identity.
  4. You are redirected back to the admin panel, now logged in.

The first user to log in for a given tenant is automatically granted the TenantAdmin role.

Signing In with Local Auth (Fallback)

If the server administrator has enabled local authentication (ADMIN_AUTH_USE_LOCAL=true), you can sign in with a username and password instead of Discord.

  1. Open the admin panel URL.
  2. You are presented with a username/password form.
  3. Enter your credentials and click Log In.
  4. You are redirected to the admin panel.

The default local admin account is seeded automatically when local auth is enabled. Ask your server administrator for the credentials.

Session Details

  • Sessions are stored as secure, HTTP-only cookies (ledgerline_auth).
  • Sessions last for up to 8 hours by default, or match the Discord token lifetime when using Discord OAuth.
  • Closing your browser does not automatically end your session, but you can log out explicitly.

Logging Out

Click the Log Out option in the admin panel, or navigate to /auth/logout. You will be returned to the login page.

Switching Tenants

If you have access to more than one tenant, you can switch tenants without logging out. Use the tenant switcher in the admin panel or call the tenant-switch endpoint. Your permissions are re-evaluated for the new tenant.

Troubleshooting

ProblemSolution
"Auth provider not found" errorThe Discord OAuth provider may not be configured for your tenant. Contact your server administrator.
Redirect loop after loginClear your browser cookies for the site and try again.
"Unauthorized" on the admin panelYour account may not have the admin role. Ask a TenantAdmin to grant you access.