Documentation

Applications and roles

Register applications, give people roles in them, and brand the hosted login.

All documentation

An application is one OpenID Connect client: its own client ID, redirect URIs, token audience, branding and roles. Every token names the application's client ID as its audience, so a token for one application is not accepted by another.

Register and manage

CallPurpose
POST /api/v1/auth/applicationsRegisters one. A confidential application's secret is in this answer only
GET /api/v1/auth/applicationsThe workspace's applications
PUT /api/v1/auth/applications/{id}Replaces its settings, or disables it with isEnabled: false
POST /api/v1/auth/applications/{id}/rotate-secretA new secret; the old one stops working at once
GET, PUT /api/v1/auth/applications/{id}/users/{userId}/rolesA person's roles in the application
Register
POST /api/v1/auth/applications
{
  "name": "Bistro",
  "confidential": false,
  "redirectUris": ["https://bistro.example/callback"],
  "postLogoutRedirectUris": ["https://bistro.example/"],
  "roles": ["waiter", "manager"],
  "logoUrl": "https://bistro.example/logo.png",
  "brandColor": "#16a34a",
  "requireRoleAssignment": true
}

Redirect URIs must be HTTPS, HTTP on a loopback host (local development and native apps), or a reverse-domain private-use scheme such as com.example.app:/callback. They match exactly.

Roles

Roles such as waiter or doctor belong to the application, apart from any other application's. With the roles scope they arrive in the roles claim. With requireRoleAssignment, only people who hold at least one of the application's roles can sign in; everyone else is returned with error=access_denied.

Who can sign in

Only people of the workspace that registered the application. A person has one account per workspace, used by all of its applications.