strapi-plugin-oidc 1.0.15 → 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,
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-oidc",
3
- "version": "1.0.15",
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",