Skip to content

Dashboard Auth

Fluxbase has two separate authentication surfaces. Understanding which one you’re dealing with avoids a common source of confusion:

SurfacePath prefixAuthenticatesUser tableRoles
Application auth/api/v1/auth/*End-users of the apps you buildauth.usersauthenticated, anon, …
Dashboard auth/dashboard/auth/*Operators of Fluxbase itselfplatform.usersinstance_admin, tenant_admin, dashboard_user

The admin UI (/admin/login) uses dashboard auth. Dashboard users are the people who administer tenants, manage service keys, and configure providers — they are not the users of your customer applications.

Both surfaces share the same JWT signing key and issuer (fluxbase); the distinction is enforced by the role claim and the middleware that guards each surface.

MethodEndpointAuthDescription
POST/dashboard/auth/signupPublicFirst-user self-registration only. Refuses with 403 once any platform.users exist; afterwards accounts are invite/SSO provisioned.
MethodEndpointAuthDescription
POST/dashboard/auth/loginPublicEmail/password login. Returns tokens, or { requires_2fa, user_id } if TOTP is enabled.
POST/dashboard/auth/refreshPublicExchange a refresh token for a new access token.
POST/dashboard/auth/2fa/verifyPublicComplete login for a 2FA-pending user (user_id + TOTP code).
MethodEndpointAuthDescription
POST/dashboard/auth/password/resetPublicTrigger a reset email (always 200 to prevent enumeration).
POST/dashboard/auth/password/reset/verifyPublicCheck a reset token’s validity before showing the form.
POST/dashboard/auth/password/reset/confirmPublicSet a new password with a valid token.

Providers must have allow_dashboard_login = true to appear here.

MethodEndpointAuthDescription
GET/dashboard/auth/sso/providersPublicList enabled SSO providers + password_login_disabled flag.
GET/dashboard/auth/sso/oauth/:providerPublicReturns { url } to start an OAuth flow.
GET/dashboard/auth/sso/oauth/:provider/callbackPublicOAuth callback; redirects to the admin UI with tokens in the URL fragment.
GET/dashboard/auth/sso/saml/:providerPublicRedirect to the SAML IdP.
POST/dashboard/auth/sso/saml/acsPublicConsume the SAML response; creates a session and redirects with tokens.

Profile & account (require dashboard auth)

Section titled “Profile & account (require dashboard auth)”
MethodEndpointAuthDescription
GET/dashboard/auth/meRequiredCurrent dashboard user.
PUT/dashboard/auth/profileRequiredUpdate full_name / avatar_url.
POST/dashboard/auth/password/changeRequiredChange password (requires current_password).
DELETE/dashboard/auth/accountRequiredSoft-delete the account (requires password confirmation).
MethodEndpointAuthDescription
POST/dashboard/auth/2fa/setupRequiredGenerate a TOTP secret + QR URL.
POST/dashboard/auth/2fa/enableRequiredVerify the first code; enables TOTP and returns backup codes.
POST/dashboard/auth/2fa/disableRequiredDisable TOTP (requires password).
  • Middleware: RequireDashboardAuth validates the Bearer access token and rejects unless role == "instance_admin" for protected routes.
  • Tokens: issued by the same JWTManager as application auth; the role claim (instance_admin / tenant_admin) and tenant context (tenant_id, tenant_role, is_instance_admin) are baked into the JWT.
  • Sessions: one active session per user in platform.sessions; old sessions are replaced on login.

This surface deliberately omits application-only features: magic links, OTP sign-in, anonymous auth, impersonation, identity link/unlink, and open signup. For those, use /api/v1/auth/* (Authentication).