Documentation

Clients

← All docs

Clients

Register OAuth client applications with redirect URIs.

A client represents an application that authenticates users through SqlOS. Each client has a unique ID, an audience, and a list of allowed redirect URIs for OAuth PKCE flows.

Register a client

Dashboard: Auth Server > Clients

Clients page

Startup seeding (recommended for first-party apps):

builder.AddSqlOS<AppDbContext>(options =>
{
    options.UseAuthServer(auth =>
    {
        auth.SeedBrowserClient(
            "my-web-app",
            "My Web Application",
            "http://localhost:3000/auth/callback",
            "https://app.example.com/auth/callback");
    });
});

Admin API:

curl -X POST http://localhost:5062/sqlos/admin/auth/api/clients \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "my-web-app",
    "name": "My Web Application",
    "audience": "sqlos",
    "redirectUris": ["http://localhost:3000/auth/callback"]
  }'
FieldRequiredDescription
clientIdYesUnique identifier (e.g., my-web-app)
nameYesDisplay name
audienceNoToken audience claim
redirectUrisYesAllowed callback URIs for OAuth flows

Startup-managed vs dashboard-created

Clients seeded in startup code are marked as startup managed. Their configuration is reapplied on every restart, so changes made in the dashboard will be overwritten.

Dashboard-created clients are fully editable and persist across restarts.

Multiple clients

Register separate clients for each frontend. The example stack seeds three:

auth.SeedBrowserClient("example-web", "Example Web", "http://localhost:3010/auth/callback");
auth.SeedBrowserClient("example-angular", "Example Angular", "http://localhost:4200/auth/callback");
auth.SeedBrowserClient("example-expo", "Example Expo", "sqlos-expo://auth-callback");