BookStackApp/BookStack · error · InvalidArgumentException
Missing required configuration "{$prop}" value
Error message
Missing required configuration "{$prop}" value What it means
OidcProviderSettings::validateInitial() enforces that clientId, clientSecret and issuer are all non-empty before OIDC auth can proceed. It runs in the constructor and in validate(). The error names the exact missing property in the message, e.g. Missing required configuration "clientId" value.
Source
Thrown at app/Access/Oidc/OidcProviderSettings.php:59
{
foreach ($settingsArray as $key => $value) {
if (property_exists($this, $key)) {
$this->$key = $value;
}
}
}
/**
* Validate any core, required properties have been set.
*
* @throws InvalidArgumentException
*/
protected function validateInitial(): void
{
$required = ['clientId', 'clientSecret', 'issuer'];
foreach ($required as $prop) {
if (empty($this->$prop)) {
throw new InvalidArgumentException("Missing required configuration \"{$prop}\" value");
}
}
if (!str_starts_with($this->issuer, 'https://')) {
throw new InvalidArgumentException('Issuer value must start with https://');
}
}
/**
* Perform a full validation on these settings.
*
* @throws InvalidArgumentException
*/
public function validate(): void
{
$this->validateInitial();
$required = ['keys', 'tokenEndpoint', 'authorizationEndpoint'];View on GitHub (pinned to 18f8469a1c)
Solutions
- Set the named missing option (oidc.client_id / oidc.app_secret / oidc.issuer) in .env and run php artisan config:clear.
- Verify with `php artisan config:show oidc` (or tinker dump) that the values are actually non-empty at runtime.
- Rebuild the config cache (`php artisan config:cache`) after editing env so cached values refresh.
- Check BookStack docs for the current OIDC env variable names — they changed across versions (e.g. OIDC_NAME, OIDC_APP_SECRET).
Example fix
# before OIDC_CLIENT_ID= OIDC_APP_SECRET= # after OIDC_CLIENT_ID=my-app-client-id OIDC_APP_SECRET=long-secret-from-idp OIDC_ISSUER=https://idp.example.com/realms/main
Defensive patterns
Strategy: validation
Validate before calling
foreach (['client_id','app_secret','issuer'] as $key) {
if (empty(config("oidc.$key"))) {
throw new RuntimeException("oidc.$key must be set before enabling OIDC login");
}
} Try / catch
try {
$settings = new OidcProviderSettings([...]);
} catch (InvalidArgumentException $e) {
Log::critical('OIDC misconfiguration: ' . $e->getMessage());
abort(500, 'OIDC is misconfigured on this server.');
} Prevention
- Set all OIDC_* env vars in .env before enabling OIDC external auth IDs.
- Run php artisan config:clear / config:cache after env changes.
- Smoke-test config with `php artisan config:show oidc` (or tinker) in deployment checks.
- Add a startup/config health check that asserts required OIDC values are present.
When it happens
Trigger: Instantiating OidcProviderSettings (directly or via OidcService::getProviderSettings) with an empty/null clientId, clientSecret, or issuer — in BookStack this means missing oidc.app_secret, oidc.name (client_id), or oidc.issuer config values, or config('oidc') returning nulls because the service isn't marked external_auth_id configured.
Common situations: Incomplete .env: OIDC_APP_SECRET or OIDC_ISSUER not set; config cache built before env vars were added; issuer left empty when discovery is expected to fill endpoints (discovery still requires issuer); upgrading BookStack to the new OIDC config schema without migrating old oidc.* options.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- Issuer value must start with https://
- Failed to read signing key with error:
- Missing or non-matching token issuer value
- Endpoint value for "{$prop}" must start with https://
- Unexpected issuer value found on discovery response
AI-assisted analysis of BookStackApp/BookStack@18f8469a1c (2026-09-02).
Data as JSON: /api/errors/e6e933bdffdbb484.
Report an issue: GitHub.