Zipline supports OAuth authentication, allowing users to log in with their existing accounts from Discord, Google, GitHub, or any OpenID Connect (OIDC) compatible provider.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/diced/zipline/llms.txt
Use this file to discover all available pages before exploring further.
Supported Providers
Zipline supports four OAuth providers:Discord
Allow users to log in with their Discord account
Allow users to log in with their Google account
GitHub
Allow users to log in with their GitHub account
OIDC
Connect to any OpenID Connect compatible provider
Configuration
Enabling OAuth
OAuth must be enabled at the system level in your database configuration:- featuresOauthRegistration: Enable OAuth login/registration
- oauthBypassLocalLogin: Skip the login page and go straight to OAuth
- oauthLoginOnly: Disable local username/password authentication entirely
Discord Setup
Create Discord Application
Visit the Discord Developer Portal and create a new application.
You can restrict access by Discord user ID using
allowedIds (whitelist) or deniedIds (blacklist).Google Setup
Create Google Cloud Project
Visit the Google Cloud Console and create a new project.
GitHub Setup
Create GitHub OAuth App
Go to GitHub Settings > Developer settings > OAuth Apps and create a new OAuth App.
OpenID Connect (OIDC) Setup
For custom OIDC providers like Keycloak, Authentik, or Authelia:OAuth Flow
The OAuth authentication flow in Zipline works as follows:- User clicks “Sign in with [Provider]”
- User is redirected to the provider’s authorization page
- After authorization, user is redirected back to Zipline with an authorization code
- Zipline exchanges the code for an access token
- Zipline fetches user information from the provider
- User is logged in or registered automatically
Implementation Reference
The OAuth implementation can be found in:- Discord:
src/server/routes/api/auth/oauth/discord.ts:10 - Google:
src/server/routes/api/auth/oauth/google.ts:10 - GitHub:
src/server/routes/api/auth/oauth/github.ts:10 - OIDC:
src/server/routes/api/auth/oauth/oidc.ts:10
Example: Discord Implementation
Account Linking
Users can link multiple OAuth providers to their account. The OAuth provider data is stored in the database:Troubleshooting
Redirect URI Mismatch
Ensure the redirect URI in your OAuth provider settings exactly matches the one configured in Zipline. The URI should be:OAuth Registration Disabled
If you see “OAuth registration is disabled”, ensurefeaturesOauthRegistration is set to true in your database.