Create an OAuth Client
To use SyAuth, you need to register an OAuth Client (also known as an Application) in the Dashboard.
Steps
- Log in to the SyAuth Dashboard.
- Navigate to OAuth Clients in the sidebar.
- Click Create Application.
- Enter a name for your application (e.g., "My Web App").
- Select the Application Type (see below).
- Click Create.
Application Types
| Type | Description |
|---|---|
| Regular Web App | Modern server-side apps (Next.js, Python, Django). Public + PKCE is recommended. |
| Single Page App (SPA) | Client-side only apps (React, Vue, Angular). Uses Public + PKCE. |
| Native App | Mobile or Desktop apps (iOS, Android, Electron). Uses Public + PKCE. |
| Machine to Machine | Backend services or CLIs. Uses Confidential (Client Credentials). |
Next Steps
Once created, you'll see your Client ID. If you chose a Confidential client, you'll also see a Client Secret. You'll need these for the Quickstart Guides.
What is an OAuth Client?
In SyAuth, an OAuth Client (also called Application) represents your software application that needs authentication. Each OAuth Client gets:
- Client ID - Public identifier for your app
- Client Secret - Secret key for Confidential clients (M2M or legacy)
- Redirect URIs - URLs where users return after authentication
Step 1: Access the Dashboard
- Go to syauth.com/dashboard
- Sign in with your developer account
- Select or create a Workspace
Step 2: Create a New OAuth Client
- In the sidebar, click OAuth Clients
- Click Create OAuth Client
- Fill in the OAuth Client details:
| Field | Description | Example |
|---|---|---|
| Name | Display name for your app | My Next.js App |
| Description | Optional description | Production web application |
| Client Type | Public or Confidential | Public (recommended for web apps using PKCE) |
| Redirect URIs | Callback URLs (one per line) | http://localhost:3000/auth/callback |
- Click Create
Step 3: Get Your Credentials
After creating the OAuth Client, you'll see your Client ID.
Important: If you are using a Confidential client, the Client Secret is shown only once. Copy it immediately and store it securely!
Step 4: Configure Your Environment
Add these credentials to your application's environment:
# .env.local
NEXT_PUBLIC_SYAUTH_API_URL=https://api.syauth.com
NEXT_PUBLIC_SYAUTH_CLIENT_ID=your-client-id-here
NEXT_PUBLIC_SYAUTH_REDIRECT_URI=http://localhost:3000/auth/callback
# SYAUTH_CLIENT_SECRET=only-required-if-confidential
Client Types Explained
Public Clients (Recommended)
- Use for: Next.js, Django, React, Mobile Apps
- Security: Uses PKCE (Proof Key for Code Exchange)
- Benefit: No secrets to manage on the server or leak in the client.
Confidential Clients
- Use for: Machine-to-Machine (M2M) services, legacy systems
- Has: Client Secret that must be kept secure
- Example: A cron job calling an API using Client Credentials flow
Redirect URIs
Redirect URIs are the URLs where SyAuth sends users after authentication.
Development
http://localhost:3000/auth/callback
Production
https://yourapp.com/auth/callback
Security: Always use HTTPS in production. Only exact URI matches are allowed.
Multiple Environments
You can add multiple redirect URIs for different environments:
http://localhost:3000/auth/callback
https://staging.yourapp.com/auth/callback
https://yourapp.com/auth/callback
Next Steps
- Quickstart Guide - Integrate with Next.js
- Key Concepts - Learn about Workspaces and Users
- Managing OAuth Clients - Advanced application settings