Authentication Modes
The dashboard provides two ways to authenticate:Basic Authentication
Username and password authentication with session management
Token Authentication
Direct authentication using Tinybird workspace tokens
Basic Authentication
The default authentication method uses username/password credentials managed through environment variables.Configuration
Set up basic authentication by configuring these environment variables:The username for dashboard access. Users will enter this when signing in.
The password for dashboard access. Use a strong, unique password in production.
Set to
true to disable authentication during local development.How It Works
When a user visits the dashboard:Authentication Check
The middleware checks for a valid session cookie. If missing, an authentication dialog appears.
Authentication Middleware
The dashboard uses Next.js middleware to protect routes:The middleware protects all routes except static files, Next.js internals, and the authentication API itself.
Sign Out
Users can sign out using the workspace menu in the header:- Click the workspace menu in the top-right corner
- Select “Sign Out”
- The session cookie is cleared and the user is redirected to the login screen
Token Authentication
For advanced use cases, users can authenticate directly with a Tinybird workspace token.Using Token Authentication
Enter Token
Paste your Tinybird workspace admin token.
Get your token from Tinybird Console → Tokens
Select Host (if needed)
If the token doesn’t include host information, select your Tinybird region:
- EU Shared:
https://api.tinybird.co - US East:
https://api.us-east.tinybird.co - AWS regions:
https://api.{region}.aws.tinybird.co - Local development:
http://localhost:7181
Token Scoping
When using token authentication, the dashboard automatically creates a scoped JWT with read-only permissions:The scoped JWT has read-only access to analytics pipes and expires after 30 days.
URL Parameters
When using token authentication, credentials are passed via URL parameters:?token=<scoped-jwt>- The generated JWT token?host=<tinybird-host>- The Tinybird API host?tenant_id=<tenant>(optional) - The tenant ID for filtering?workspace=<name>(optional) - The workspace name for display
Public Mode
For embedded dashboards or public analytics, you can bypass authentication by passing tokens in HTTP headers:Multi-Tenant Authentication
For multi-tenant deployments where multiple customers share the same dashboard:Multi-tenant mode requires your Tinybird data project to include a
tenant_id column in all analytics tables.Development Mode
During local development, you can disable authentication to speed up iteration:Security Best Practices
Use Strong Passwords
Use Strong Passwords
Choose a strong, unique password for
DASHBOARD_PASSWORD. Consider using a password manager to generate and store it.Rotate Credentials Regularly
Rotate Credentials Regularly
Change your dashboard password and Tinybird tokens periodically, especially if team members leave.
Limit Token Permissions
Limit Token Permissions
Use tokens with the minimum required permissions. Read-only tokens are sufficient for the dashboard.
Enable HTTPS
Enable HTTPS
Always use HTTPS in production to encrypt authentication credentials in transit.
Monitor Access Logs
Monitor Access Logs
Review Vercel logs and Tinybird access logs to detect unauthorized access attempts.
Don't Commit Secrets
Don't Commit Secrets
Never commit
.env files to version control. Use .env.example for templates only.Troubleshooting
Authentication loop / Can't sign in
Authentication loop / Can't sign in
- Clear browser cookies and try again
- Verify
DASHBOARD_USERNAMEandDASHBOARD_PASSWORDare set correctly - Check browser console for errors
- Ensure session cookies are not blocked
Token authentication fails
Token authentication fails
- Verify the token is valid in Tinybird Console
- Check the token has read permissions for all pipes
- Confirm the host URL matches your workspace region
- Try creating a new admin token
Logged out unexpectedly
Logged out unexpectedly
Session cookies expire after a period of inactivity. Simply sign in again to continue.
Next Steps
Deploy to Production
Learn how to deploy your dashboard with proper authentication
Customize the Dashboard
Adapt the UI to match your brand