Create OIDC Provider
Register a new OIDC SSO provider in Alarik.
| Endpoint | Method | Admin Required |
|---|---|---|
/api/v1/admin/oidcProviders | POST | Yes |
Registers a new OIDC identity provider. Once created, it immediately shows up as a sign-in option on the login page (unless enabled is false).
Register
{API_BASE_URL}/api/v1/auth/oidc/callback as the redirect URI in the identity provider's own app configuration - this single URL is shared by every provider configured in Alarik.Request Body
name
string required
Display label shown on the login page, e.g. "Google".
issuerURL
string required
The provider's OIDC issuer URL. Alarik fetches
{issuerURL}/.well-known/openid-configuration from this.clientId
string required
The OAuth client ID registered with the provider.
clientSecret
string required
The OAuth client secret registered with the provider. Write-only - never returned by any endpoint after creation.
enabled
boolean required
Whether the provider should be shown as a sign-in option.
Example
{
"name": "Google",
"issuerURL": "https://accounts.google.com",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"enabled": true
}
Response
Returns the created provider (without the client secret):
{
"id": "63717CB9-DE10-44D2-AC69-774F57F6C148",
"name": "Google",
"issuerURL": "https://accounts.google.com",
"clientId": "your-client-id",
"enabled": true
}
Errors
| Status | Reason |
|---|---|
400 | Validation failed (empty name, issuer URL, client ID, or client secret) |