Skip to main content

Create an OAuth Client

To use SyAuth, you need to register an OAuth Client (also known as an Application) in the Dashboard.

Steps

  1. Log in to the SyAuth Dashboard.
  2. Navigate to OAuth Clients in the sidebar.
  3. Click Create Application.
  4. Enter a name for your application (e.g., "My Web App").
  5. Select the Application Type (see below).
  6. Click Create.

Application Types

TypeDescription
Regular Web AppModern 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 AppMobile or Desktop apps (iOS, Android, Electron). Uses Public + PKCE.
Machine to MachineBackend 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

  1. Go to syauth.com/dashboard
  2. Sign in with your developer account
  3. Select or create a Workspace

Step 2: Create a New OAuth Client

  1. In the sidebar, click OAuth Clients
  2. Click Create OAuth Client
  3. Fill in the OAuth Client details:
FieldDescriptionExample
NameDisplay name for your appMy Next.js App
DescriptionOptional descriptionProduction web application
Client TypePublic or ConfidentialPublic (recommended for web apps using PKCE)
Redirect URIsCallback URLs (one per line)http://localhost:3000/auth/callback
  1. 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

  • 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