strapi-plugin-oidc 1.1.0 → 1.1.1

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.
@@ -7,7 +7,7 @@ const react = require("react");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const reactIntl = require("react-intl");
10
- const index = require("./index-DjcgmYQl.js");
10
+ const index = require("./index-Dj2m6xLY.js");
11
11
  const en = require("./en-8UlbiAHW.js");
12
12
  const styled = require("styled-components");
13
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -54,7 +54,7 @@ const index = {
54
54
  defaultMessage: "Configuration"
55
55
  },
56
56
  Component: async () => {
57
- return await import("./index-CILUKj10.mjs");
57
+ return await import("./index-CxxsmBsC.mjs");
58
58
  },
59
59
  permissions: [{ action: "plugin::strapi-plugin-oidc.read", subject: null }]
60
60
  }
@@ -105,6 +105,14 @@ const index = {
105
105
  }
106
106
  const response = await originalFetch(...args);
107
107
  if (isLogout && response.ok) {
108
+ window.localStorage.removeItem("jwtToken");
109
+ window.localStorage.removeItem("isLoggedIn");
110
+ window.sessionStorage.removeItem("jwtToken");
111
+ window.sessionStorage.removeItem("isLoggedIn");
112
+ document.cookie = "jwtToken=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
113
+ document.cookie = "jwtToken=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/admin";
114
+ document.cookie = "strapi_admin_refresh=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
115
+ document.cookie = "strapi_admin_refresh=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/admin";
108
116
  window.location.href = "/strapi-plugin-oidc/logout";
109
117
  return new Promise(() => {
110
118
  });
@@ -5,7 +5,7 @@ import { useState, useCallback, useEffect, memo } from "react";
5
5
  import { Typography, Flex, Box, MultiSelect, MultiSelectOption, Field, Button, Divider, Thead, Tr, Th, Tbody, Td, Dialog, IconButton, Pagination, PreviousLink, PageLink, NextLink, Table, Alert } from "@strapi/design-system";
6
6
  import { Plus, Trash, WarningCircle } from "@strapi/icons";
7
7
  import { useIntl } from "react-intl";
8
- import { p as pluginId } from "./index-QgIxjc0g.mjs";
8
+ import { p as pluginId } from "./index-BsP7WM7b.mjs";
9
9
  import en from "./en-DInn-mdh.mjs";
10
10
  import styled from "styled-components";
11
11
  function getTrad(id) {
@@ -55,7 +55,7 @@ const index = {
55
55
  defaultMessage: "Configuration"
56
56
  },
57
57
  Component: async () => {
58
- return await Promise.resolve().then(() => require("./index-BEJGt6t1.js"));
58
+ return await Promise.resolve().then(() => require("./index-B2lPDW7A.js"));
59
59
  },
60
60
  permissions: [{ action: "plugin::strapi-plugin-oidc.read", subject: null }]
61
61
  }
@@ -106,6 +106,14 @@ const index = {
106
106
  }
107
107
  const response = await originalFetch(...args);
108
108
  if (isLogout && response.ok) {
109
+ window.localStorage.removeItem("jwtToken");
110
+ window.localStorage.removeItem("isLoggedIn");
111
+ window.sessionStorage.removeItem("jwtToken");
112
+ window.sessionStorage.removeItem("isLoggedIn");
113
+ document.cookie = "jwtToken=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
114
+ document.cookie = "jwtToken=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/admin";
115
+ document.cookie = "strapi_admin_refresh=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
116
+ document.cookie = "strapi_admin_refresh=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/admin";
109
117
  window.location.href = "/strapi-plugin-oidc/logout";
110
118
  return new Promise(() => {
111
119
  });
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-DjcgmYQl.js");
3
+ const index = require("./index-Dj2m6xLY.js");
4
4
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "./index-QgIxjc0g.mjs";
1
+ import { i } from "./index-BsP7WM7b.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-oidc",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
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",
@@ -63,8 +63,8 @@
63
63
  }
64
64
  ],
65
65
  "engines": {
66
- "node": ">=22.0.0 <=22.x.x",
67
- "npm": "10.x.x"
66
+ "node": ">=20.0.0 <=24.x.x",
67
+ "npm": ">=6.0.0"
68
68
  },
69
69
  "files": [
70
70
  "dist"