Custom Authentication
UTXOS supports three authentication modes, from zero-configuration default login to full integration with your existing authentication system. Choose the approach that matches your application needs.
What authentication modes are available?
| Mode | Plan | Description |
|---|---|---|
| Default | All (including free) | Use UTXOS-managed OAuth credentials |
| Custom OAuth | Pro, Scale | Bring your own OAuth client credentials |
| Third-Party Auth | Scale | Pass tokens from your existing auth system |
Default Authentication
Default authentication requires no configuration. Enable providers from the dashboard and users authenticate through UTXOS-managed OAuth apps.
How It Works
- User clicks “Sign in with Google” (or other provider)
- User authenticates with the provider via UTXOS OAuth app
- UTXOS creates or retrieves the user’s wallet
- User is returned to your application
Enable Default Providers
- Go to Dashboard > Project Settings > Authentication
- Toggle on the providers you want to support
- No additional configuration needed
Default authentication is available on all plans, including the free Base tier.
Custom OAuth Credentials
Use your own OAuth credentials to customize the login experience. Your branding appears on the OAuth consent screen, and you control the requested permissions.
Benefits
- Your app name and logo on consent screens
- Control over OAuth scopes and permissions
- Consistent branding throughout the user journey
- Full control over OAuth app settings
Setup
Configuration
After creating your OAuth app with the provider:
- Go to Dashboard > Project Settings > Authentication
- Click Configure next to the provider
- Enter your Client ID and Client Secret
- Save changes
// SDK usage is the same - authentication method is configured in dashboard
import { Web3Sdk } from "@utxos/sdk";
const sdk = new Web3Sdk({
projectId: process.env.NEXT_PUBLIC_UTXOS_PROJECT_ID,
});
// Users see your custom OAuth app branding
const wallet = await sdk.wallet.connect();Custom OAuth credentials require a Pro or Scale plan. Keep your Client Secret secure and never expose it in client-side code.
Third-Party Authentication
For applications with existing OAuth2 authentication, pass your users’ refresh tokens to UTXOS. This skips the UTXOS login prompt entirely, since users already authenticated with your system.
Benefits
- No duplicate login prompts
- Seamless integration with existing auth
- Single sign-on experience
- Users stay in your authentication flow
How It Works
- User authenticates with your application (your existing flow)
- You obtain a refresh token from the OAuth provider
- Pass the refresh token to UTXOS SDK
- UTXOS uses the token to verify identity and create/retrieve the wallet
Implementation
import { Web3Sdk } from "@utxos/sdk";
const sdk = new Web3Sdk({
projectId: process.env.NEXT_PUBLIC_UTXOS_PROJECT_ID,
});
// User already authenticated with your system
// You have their OAuth refresh token
const userRefreshToken = await getRefreshTokenFromYourAuthSystem();
// Pass the token to UTXOS
const wallet = await sdk.wallet.connectWithToken({
provider: "google", // or "discord", "twitter", "apple"
refreshToken: userRefreshToken,
});
// Wallet is now available without additional login
const address = await wallet.cardano.getChangeAddress();Requirements
| Requirement | Details |
|---|---|
| Plan | Scale |
| OAuth provider | Same provider configured in both your app and UTXOS |
| Token type | OAuth2 refresh token |
| Scopes | Your OAuth app must request scopes that UTXOS requires |
Supported Providers
| Provider | Token Type | Required Scopes |
|---|---|---|
| Refresh token | openid, email, profile | |
| Discord | Refresh token | identify, email |
| Refresh token | users.read, offline.access | |
| Apple | Refresh token | name, email |
Third-party authentication is available on Scale plans. Contact support@utxos.dev for setup assistance.
Security Considerations
- Refresh tokens are sensitive. Transmit them only over HTTPS.
- Tokens should be passed server-side when possible.
- Implement proper token storage and rotation in your authentication system.
Provider Setup Guides
For detailed setup instructions for each provider:
Next Steps
- Authentication Provider Overview - Full authentication documentation
- Custom Branding - Customize wallet appearance
- Wallet Integration - Integrate wallets into your app