Authentication Methods
Tuist supports three authentication methods:Browser Login
Interactive authentication for local development
Email/Password
Direct credential authentication for scripts
OIDC
CI environment authentication with identity tokens
Browser-Based Authentication
The default and most user-friendly method is browser-based authentication using OAuth:- Open your default browser with the authentication page
- Wait for you to log in or sign up
- Store authentication tokens locally
- Confirm successful authentication
Browser-based authentication is automatically selected when running on a local machine (non-CI environment).
Custom Server URL
If you’re using a self-hosted Tuist server or a different environment, specify the server URL:TUIST_URL environment variable:
Email and Password Authentication
For automation or scripts where browser interaction isn’t possible, use email and password authentication:Using Environment Variables
CI/CD Authentication with OIDC
For continuous integration environments, Tuist automatically detects CI and uses OpenID Connect (OIDC) for authentication:- Detect the CI environment automatically
- Fetch an OIDC token from the CI provider
- Exchange it for a Tuist access token
- Use the token for subsequent requests
Supported CI Providers
- GitHub Actions
- GitLab CI
- Bitrise
- CircleCI
- Buildkite
- Codemagic
OIDC authentication requires your CI provider to be configured to provide OIDC tokens. Most modern CI systems support this by default.
GitHub Actions Example
.github/workflows/build.yml
Managing Authentication
Check Authentication Status
Verify your current authentication status:- Your username or email
- The server you’re authenticated with
- Authentication token expiry (if applicable)
Logout
Remove stored authentication tokens:Refresh Tokens
Authentication tokens automatically refresh when needed. To manually refresh:Token Storage
Authentication tokens are securely stored on your local machine:- macOS: Keychain
- Linux: Encrypted file in
~/.tuist
- Access token: Short-lived token for API requests
- Refresh token: Long-lived token to obtain new access tokens
Project-Specific Configuration
Configure the Tuist server URL in your project’sConfig.swift:
Config.swift
--url with each command.
Project Tokens
For CI/CD environments that don’t support OIDC, create project-specific tokens:Project tokens are scoped to specific projects and can be revoked at any time from the Tuist web interface.
Troubleshooting
Authentication Fails in CI
If OIDC authentication fails in CI:- Ensure your CI provider supports OIDC
- Verify the
id-token: writepermission is set (for GitHub Actions) - Check CI environment variables are correctly configured
- Try using a project token instead
Token Expired
If you see authentication errors:Server Connection Issues
Verify you can reach the server:Next Steps
Set up cache
Enable binary caching for faster builds
Upload previews
Share app builds with your team