Overview
The tenant registration flow involves coordination between your frontend application, backend services, and the Upsolve API to securely register tenants and manage their access tokens.Key Requirements
Critical Implementation Points:
- Token must be passed to frontend - Required for UpsolveDashboard component
- 1-hour expiration - Tokens expire after 1 hour and must be refreshed
- No server-side caching - Upsolve does not cache/store permissions for users
- Fresh token required - Each dashboard view requires a valid, current token
Critical Data Flow
Step-by-Step Process
1. Initial Tenant Registration
Frontend Request2. Token Storage
The backend should save the token and expiry information to theUpsolveTenant
model/entity for future use.
3. Permission Retrieval
Frontend Request4. Token Refresh
Since tokens expire after 1 hour, implement a refresh mechanism: Frontend Request5. Frontend Integration
Pass the valid token to the UpsolveDashboard component:Implementation Details
Token Management
- Expiration: Tokens expire after 1 hour
- No Caching: Upsolve does not cache or store permissions - fresh tokens required
- Frontend Requirement: Token must be passed to frontend for dashboard rendering
- Refresh Strategy: Implement automatic refresh before expiration
- Storage: Store tokens securely in your backend database
- Validation: Always check token validity before dashboard rendering
Error Handling
Common Error Scenarios: Invalid API KeySecurity Considerations
- API Key Protection: Never expose API keys in frontend code
- Token Scope: Tokens are tenant-specific and cannot access other tenant data
- HTTPS Required: All API communications must use HTTPS
- Token Rotation: Implement regular token refresh cycles
Frontend Integration Requirements
Critical: The token must be passed to the frontend since Upsolve does not store user permissions server-side. Each dashboard render requires a valid token.