Overview
The Fluxer API supports multiple authentication methods to secure access to resources. Most endpoints require authentication, while some public endpoints can be accessed without credentials.Authentication Methods
Session-Based Authentication
The primary authentication method uses HTTP-only cookies for session management. This is the most secure method for web applications.OAuth2 Authentication
Fluxer supports OAuth2 for third-party integrations and applications.Authorization Code Flow
Using Access Tokens
Include the access token in theAuthorization header:
Single Sign-On (SSO)
Fluxer supports SSO authentication for enterprise deployments.WebAuthn / Passkeys
Fluxer supports passwordless authentication using WebAuthn (FIDO2) and passkeys.WebAuthn configuration is controlled by
auth.passkeys.rp_name, auth.passkeys.rp_id, and auth.passkeys.additional_allowed_origins in the API config.Authentication Headers
Session Cookie
HTTP-only session cookie:
fluxer_session=<token>Bearer Token
OAuth2 access token:
Bearer <access_token>Internal Service Authentication
Internal services authenticate using a shared secret key:Secret key for internal service-to-service communication
Multi-Factor Authentication (MFA)
Fluxer supports multiple MFA methods:TOTP (Time-based One-Time Password)
SMS Verification
WebAuthn MFA
Sudo Mode
Sensitive operations require sudo mode verification. Users must re-authenticate within a short time window.Sudo mode tokens are valid for 15 minutes and are stored in an HTTP-only cookie:
fluxer_sudo_modeConnection Handoff
Fluxer supports secure connection handoff for desktop/mobile apps:IP Authorization
For enhanced security, Fluxer can require IP authorization for new locations:Security Configuration
Authentication behavior is configured via the API config:Cookie Configuration
Session cookies are configured with security best practices:Best Practices
Use HTTPS in Production
Use HTTPS in Production
Always use HTTPS to protect authentication tokens and session cookies from interception.
Implement Token Refresh
Implement Token Refresh
For OAuth2 applications, implement token refresh logic to maintain long-lived sessions.
Handle MFA Gracefully
Handle MFA Gracefully
When MFA is required, the API returns a
ticket field. Use this ticket to complete MFA verification.Respect Rate Limits
Respect Rate Limits
Authentication endpoints have strict rate limits to prevent brute-force attacks. Implement exponential backoff.
Validate Session State
Validate Session State
Check the
/users/@me endpoint to validate session state before sensitive operations.Logout
To end a session:Logout All Sessions
Next Steps
API Endpoints
Explore available API endpoints
OAuth Applications
Build OAuth2 integrations