Authentication (Logto)
Managed OIDC-compliant authentication with social login, JWT tokens, and a full admin console.
Creating an Auth Server
To create a new auth instance:
- Navigate to the Auth Servers section in the sh0 dashboard.
- Click Create Auth Server.
- Enter a name for your auth instance (e.g., "my-app-auth").
- Select the PostgreSQL database server to connect to.
- Click Create. sh0 deploys a Logto instance with auto-SSL.
my-app-auth.sh0.app). Choose a descriptive name.Connecting to PostgreSQL
Each Logto instance requires a PostgreSQL database server for storing user data, sessions, and configuration. sh0 automatically:
- Creates a dedicated database within your PostgreSQL server.
- Configures the connection string for Logto.
- Runs the initial Logto migrations.
Your user data never leaves your server. It is stored in the same PostgreSQL instance you control.
Admin Console
Each Logto instance includes a full admin console accessible at your auth domain. From the console you can:
- Manage users (create, edit, delete, reset passwords).
- Configure sign-in experience (branding, colors, logo).
- Set up applications and their redirect URIs.
- Add social login connectors (Google, GitHub, etc.).
- View audit logs and session activity.
- Enable MFA (TOTP-based).
Sign-In Methods
Logto supports multiple sign-in methods out of the box:
| Method | Description |
|---|---|
| Email + Password | Traditional email/password with email verification |
| Passwordless (Email) | Magic link or verification code via email |
| Social Login | Google, GitHub, Apple, Discord, and more |
| Phone + SMS | SMS verification code (requires SMS connector) |
Social Connectors
To add a social login provider, go to the Logto admin console, navigate to Connectors, and add a new social connector. You will need the OAuth client ID and secret from the provider (e.g., Google Cloud Console, GitHub Developer Settings).
SDK Integration
Logto provides official SDKs for popular frameworks:
| Platform | Package |
|---|---|
| Browser (SPA) | @logto/browser |
| React | @logto/react |
| Next.js | @logto/next |
| Vue | @logto/vue |
| Node.js (Express) | @logto/express |
| Python | logto-sdk-python |
Basic integration requires two configuration values: the endpoint (your auth domain) and the appId (from the Logto admin console).
JWT Verification
Logto issues standard OIDC tokens (access token, ID token, refresh token). To verify tokens in your API:
- Fetch the JWKS from
https://<your-auth>.sh0.app/oidc/.well-known/openid-configuration. - Verify the token signature using the public key.
- Check the
iss,aud, andexpclaims.