strapi-plugin-oidc 1.0.13 → 1.0.16

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.
@@ -171,7 +171,7 @@ async function oidcSignIn(ctx) {
171
171
  if (!state) {
172
172
  state = node_crypto.randomBytes(32).toString("base64url");
173
173
  }
174
- const isProduction = process.env.NODE_ENV === "production";
174
+ const isProduction = strapi.config.get("environment") === "production";
175
175
  ctx.cookies.set("oidc_code_verifier", codeVerifier, {
176
176
  httpOnly: true,
177
177
  maxAge: 6e5,
@@ -518,7 +518,7 @@ const routes = [
518
518
  handler: "oidc.oidcSignIn",
519
519
  config: {
520
520
  auth: false,
521
- middlewares: [rateLimitMiddleware, "strapi::session"]
521
+ middlewares: [rateLimitMiddleware]
522
522
  }
523
523
  },
524
524
  {
@@ -527,7 +527,7 @@ const routes = [
527
527
  handler: "oidc.oidcSignInCallback",
528
528
  config: {
529
529
  auth: false,
530
- middlewares: [rateLimitMiddleware, "strapi::session"]
530
+ middlewares: [rateLimitMiddleware]
531
531
  }
532
532
  },
533
533
  {
@@ -165,7 +165,7 @@ async function oidcSignIn(ctx) {
165
165
  if (!state) {
166
166
  state = randomBytes(32).toString("base64url");
167
167
  }
168
- const isProduction = process.env.NODE_ENV === "production";
168
+ const isProduction = strapi.config.get("environment") === "production";
169
169
  ctx.cookies.set("oidc_code_verifier", codeVerifier, {
170
170
  httpOnly: true,
171
171
  maxAge: 6e5,
@@ -512,7 +512,7 @@ const routes = [
512
512
  handler: "oidc.oidcSignIn",
513
513
  config: {
514
514
  auth: false,
515
- middlewares: [rateLimitMiddleware, "strapi::session"]
515
+ middlewares: [rateLimitMiddleware]
516
516
  }
517
517
  },
518
518
  {
@@ -521,7 +521,7 @@ const routes = [
521
521
  handler: "oidc.oidcSignInCallback",
522
522
  config: {
523
523
  auth: false,
524
- middlewares: [rateLimitMiddleware, "strapi::session"]
524
+ middlewares: [rateLimitMiddleware]
525
525
  }
526
526
  },
527
527
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-oidc",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
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",