{"record":{"id":"e6e933bdffdbb484","repo":"BookStackApp/BookStack","slug":"missing-required-configuration-prop-value","errorCode":null,"errorMessage":"Missing required configuration \"{$prop}\" value","messagePattern":"Missing required configuration \"(.+?)\" value","errorType":"validation","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"app/Access/Oidc/OidcProviderSettings.php","lineNumber":59,"sourceCode":"    {\n        foreach ($settingsArray as $key => $value) {\n            if (property_exists($this, $key)) {\n                $this->$key = $value;\n            }\n        }\n    }\n\n    /**\n     * Validate any core, required properties have been set.\n     *\n     * @throws InvalidArgumentException\n     */\n    protected function validateInitial(): void\n    {\n        $required = ['clientId', 'clientSecret', 'issuer'];\n        foreach ($required as $prop) {\n            if (empty($this->$prop)) {\n                throw new InvalidArgumentException(\"Missing required configuration \\\"{$prop}\\\" value\");\n            }\n        }\n\n        if (!str_starts_with($this->issuer, 'https://')) {\n            throw new InvalidArgumentException('Issuer value must start with https://');\n        }\n    }\n\n    /**\n     * Perform a full validation on these settings.\n     *\n     * @throws InvalidArgumentException\n     */\n    public function validate(): void\n    {\n        $this->validateInitial();\n\n        $required = ['keys', 'tokenEndpoint', 'authorizationEndpoint'];","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/BookStackApp/BookStack/blob/18f8469a1c72f8cc8497e9372635e6dea5028071/app/Access/Oidc/OidcProviderSettings.php#L41-L77","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":"# before\nOIDC_CLIENT_ID=\nOIDC_APP_SECRET=\n# after\nOIDC_CLIENT_ID=my-app-client-id\nOIDC_APP_SECRET=long-secret-from-idp\nOIDC_ISSUER=https://idp.example.com/realms/main","handlingStrategy":"validation","validationCode":"foreach (['client_id','app_secret','issuer'] as $key) {\n    if (empty(config(\"oidc.$key\"))) {\n        throw new RuntimeException(\"oidc.$key must be set before enabling OIDC login\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    $settings = new OidcProviderSettings([...]);\n} catch (InvalidArgumentException $e) {\n    Log::critical('OIDC misconfiguration: ' . $e->getMessage());\n    abort(500, 'OIDC is misconfigured on this server.');\n}","preventionTips":["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."],"tags":["configuration","oidc","validation"],"backgroundTag":"missing-config-value","analyzedSha":"18f8469a1c72f8cc8497e9372635e6dea5028071","analyzedAt":"2026-09-02T19:49:33.068Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}