{"record":{"id":"6fdaefff136af939","repo":"gitroomhq/postiz-app","slug":"not-found","errorCode":"not_found","errorMessage":"{\n  error: 'not_found',\n  error_description: 'OIDC email claims are not enabled',\n}","messagePattern":"\\{\n  error: 'not_found',\n  error_description: 'OIDC email claims are not enabled',\n\\}","errorType":"http","errorClass":"HttpException","httpStatus":404,"severity":"warning","filePath":"libraries/nestjs-libraries/src/database/prisma/oauth/oauth.service.ts","lineNumber":344,"sourceCode":"    );\n\n    return {\n      id: organizationId,\n      cus: paymentId,\n      access_token: token,\n      token_type: 'bearer',\n      scope: oauthScope(clientId),\n    };\n  }\n\n  async getOrgByOAuthToken(token: string) {\n    const encrypted = AuthService.fixedEncryption(token);\n    return this._oauthRepository.findByAccessToken(encrypted);\n  }\n\n  async getUserInfo(authorization?: string) {\n    if (!enableOidcEmailClaims()) {\n      throw new HttpException(\n        {\n          error: 'not_found',\n          error_description: 'OIDC email claims are not enabled',\n        },\n        HttpStatus.NOT_FOUND\n      );\n    }\n\n    const token = extractBearerToken(authorization);\n    if (!token) {\n      throw new HttpException(\n        { error: 'invalid_token', error_description: 'Bearer token required' },\n        HttpStatus.UNAUTHORIZED\n      );\n    }\n\n    const authorizationRecord = await this.getOrgByOAuthToken(token);\n    if (!authorizationRecord) {","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/database/prisma/oauth/oauth.service.ts#L326-L362","documentation":"Returned as HTTP 404 from getUserInfo when the server-level OIDC email claims feature flag (enableOidcEmailClaims(), typically an env/config toggle) is disabled. The /userinfo-style endpoint is gated off entirely rather than returning claims.","triggerScenarios":"Calling the user info endpoint on a Postiz deployment where the OIDC email claims env variable is not set/enabled (e.g. missing ENABLE_OIDC_EMAIL_CLAIMS or OPENAI_OAUTH_CLIENT_ID setup).","commonSituations":"Self-hosted deployments without the OIDC env config; upgrading Postiz and expecting userinfo to work without enabling the feature; hitting the wrong deployment where the flag isn't set.","solutions":["Enable the OIDC email claims feature via the deployment's environment configuration (set the relevant env vars and restart)","If self-hosting, check .env / compose for the OIDC toggle and the OpenAI OAuth client id config","If you don't need email claims, stop calling getUserInfo"],"exampleFix":"# before\n# .env has no OIDC config\n# after\nENABLE_OIDC_EMAIL_CLAIMS=true\nOPENAI_OAUTH_CLIENT_ID=<your-client-id>","handlingStrategy":"type-guard","validationCode":"if (!serverSupportsOidcEmailClaims) { throw new Error('userinfo is disabled on this deployment'); }","typeGuard":"const canUseUserinfo = (config: {oidcEmailClaimsEnabled: boolean}): boolean => config.oidcEmailClaimsEnabled;","tryCatchPattern":"try { return await getUserInfo(auth); } catch (e) { if (e?.response?.data?.error === 'not_found') return null; throw e; }","preventionTips":["Check the deployment's feature flags before integrating userinfo","Document required env vars for OIDC in your deployment README"],"tags":["oidc","userinfo","feature-flag","config"],"backgroundTag":"feature-flag-disabled","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}