strapi-plugin-oidc 1.9.4 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,7 +59,8 @@ const errorMessages = {
59
59
  WHITELIST_NOT_PRESENT: "Not present in whitelist",
60
60
  PROVIDER_RESPONSE_INVALID: "Unexpected response from OIDC provider",
61
61
  SESSION_MANAGER_UNSUPPORTED: "sessionManager is not supported. Please upgrade to Strapi v5.24.1 or later.",
62
- JWKS_URI_NOT_CONFIGURED: "[OIDC] OIDC_JWKS_URI is not configured — ID token signature verification is disabled. Set OIDC_JWKS_URI and OIDC_ISSUER from your provider's discovery document.",
62
+ OIDC_ISSUER_NOT_CONFIGURED: "[strapi-plugin-oidc] OIDC_ISSUER is not configured — discovery skipped. OIDC sign-in will fail until OIDC_ISSUER is set in your plugin config.",
63
+ JWKS_URI_NOT_CONFIGURED: "[strapi-plugin-oidc] OIDC_JWKS_URI is not configured — ID token signature verification is disabled. Set OIDC_JWKS_URI and OIDC_ISSUER from your provider's discovery document.",
63
64
  ENFORCE_MIDDLEWARE_ERROR: "Error checking OIDC enforcement in middleware:",
64
65
  ENFORCE_SYNC_ERROR: "[strapi-plugin-oidc] Failed to sync OIDC_ENFORCE to database:",
65
66
  DEFAULT_ROLE_INIT_ERROR: "Could not initialize default OIDC role:",
@@ -207,7 +208,10 @@ const FIELD_MAP = [
207
208
  async function applyDiscovery(strapi2) {
208
209
  const config2 = strapi2.config.get("plugin::strapi-plugin-oidc");
209
210
  const issuer = config2.OIDC_ISSUER;
210
- if (!issuer) return;
211
+ if (!issuer) {
212
+ strapi2.log.warn(errorMessages.OIDC_ISSUER_NOT_CONFIGURED);
213
+ return;
214
+ }
211
215
  let discoveryUrl;
212
216
  let canonicalIssuer;
213
217
  if (issuer.includes(OIDC_DISCOVERY_PATH)) {
@@ -53,7 +53,8 @@ const errorMessages = {
53
53
  WHITELIST_NOT_PRESENT: "Not present in whitelist",
54
54
  PROVIDER_RESPONSE_INVALID: "Unexpected response from OIDC provider",
55
55
  SESSION_MANAGER_UNSUPPORTED: "sessionManager is not supported. Please upgrade to Strapi v5.24.1 or later.",
56
- JWKS_URI_NOT_CONFIGURED: "[OIDC] OIDC_JWKS_URI is not configured — ID token signature verification is disabled. Set OIDC_JWKS_URI and OIDC_ISSUER from your provider's discovery document.",
56
+ OIDC_ISSUER_NOT_CONFIGURED: "[strapi-plugin-oidc] OIDC_ISSUER is not configured — discovery skipped. OIDC sign-in will fail until OIDC_ISSUER is set in your plugin config.",
57
+ JWKS_URI_NOT_CONFIGURED: "[strapi-plugin-oidc] OIDC_JWKS_URI is not configured — ID token signature verification is disabled. Set OIDC_JWKS_URI and OIDC_ISSUER from your provider's discovery document.",
57
58
  ENFORCE_MIDDLEWARE_ERROR: "Error checking OIDC enforcement in middleware:",
58
59
  ENFORCE_SYNC_ERROR: "[strapi-plugin-oidc] Failed to sync OIDC_ENFORCE to database:",
59
60
  DEFAULT_ROLE_INIT_ERROR: "Could not initialize default OIDC role:",
@@ -201,7 +202,10 @@ const FIELD_MAP = [
201
202
  async function applyDiscovery(strapi2) {
202
203
  const config2 = strapi2.config.get("plugin::strapi-plugin-oidc");
203
204
  const issuer = config2.OIDC_ISSUER;
204
- if (!issuer) return;
205
+ if (!issuer) {
206
+ strapi2.log.warn(errorMessages.OIDC_ISSUER_NOT_CONFIGURED);
207
+ return;
208
+ }
205
209
  let discoveryUrl;
206
210
  let canonicalIssuer;
207
211
  if (issuer.includes(OIDC_DISCOVERY_PATH)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-oidc",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "A Strapi plugin that provides OpenID Connect (OIDC) authentication functionality for the Strapi Admin Panel.",
5
5
  "strapi": {
6
6
  "displayName": "OIDC Plugin",