strapi-plugin-oidc 1.4.2 → 1.4.3
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.
- package/dist/admin/{index-RMgj1w0B.js → index-CqgjBmJ5.js} +3 -2
- package/dist/admin/{index-BnFRueNv.js → index-DWm8oOJF.js} +2 -2
- package/dist/admin/{index-CY4s-vtv.mjs → index-Dz3WlTpL.mjs} +2 -2
- package/dist/admin/{index-ZRaWWFUL.mjs → index-Dzf0bJC1.mjs} +3 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +5 -3
- package/dist/server/index.mjs +5 -3
- package/package.json +1 -1
|
@@ -92,7 +92,8 @@ const en = {
|
|
|
92
92
|
"unsaved.title": "Unsaved Changes",
|
|
93
93
|
"unsaved.description": "You have unsaved changes that will be lost if you leave. Do you want to continue?",
|
|
94
94
|
"unsaved.confirm": "Leave",
|
|
95
|
-
"unsaved.cancel": "Stay"
|
|
95
|
+
"unsaved.cancel": "Stay",
|
|
96
|
+
"whitelist.table.roles.default": "(Default)"
|
|
96
97
|
};
|
|
97
98
|
function getTrad(id) {
|
|
98
99
|
const pluginIdWithId = `${pluginId}.${id}`;
|
|
@@ -123,7 +124,7 @@ const index = {
|
|
|
123
124
|
defaultMessage: "Configuration"
|
|
124
125
|
},
|
|
125
126
|
Component: async () => {
|
|
126
|
-
return await Promise.resolve().then(() => require("./index-
|
|
127
|
+
return await Promise.resolve().then(() => require("./index-DWm8oOJF.js"));
|
|
127
128
|
},
|
|
128
129
|
permissions: [{ action: "plugin::strapi-plugin-oidc.read", subject: null }]
|
|
129
130
|
}
|
|
@@ -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-
|
|
10
|
+
const index = require("./index-CqgjBmJ5.js");
|
|
11
11
|
const styled = require("styled-components");
|
|
12
12
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
13
13
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
@@ -231,7 +231,7 @@ function Whitelist({
|
|
|
231
231
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: user.email }),
|
|
232
232
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: userRolesNames ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
|
|
233
233
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: userRolesNames }),
|
|
234
|
-
isDefault && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral500", children: "
|
|
234
|
+
isDefault && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral500", children: formatMessage(index.getTrad("whitelist.table.roles.default")) })
|
|
235
235
|
] }) : "-" }),
|
|
236
236
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(LocalizedDate, { date: user.createdAt }) }),
|
|
237
237
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { style: { paddingRight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5,7 +5,7 @@ import { useState, useRef, useCallback, useEffect, memo } from "react";
|
|
|
5
5
|
import { Typography, Flex, Box, MultiSelect, MultiSelectOption, Button, Dialog, Field, Divider, Thead, Tr, Th, Tbody, Td, IconButton, Pagination, PreviousLink, PageLink, NextLink, Table, Alert } from "@strapi/design-system";
|
|
6
6
|
import { Download, Upload, Trash, WarningCircle, Plus, Information } from "@strapi/icons";
|
|
7
7
|
import { useIntl } from "react-intl";
|
|
8
|
-
import { g as getTrad } from "./index-
|
|
8
|
+
import { g as getTrad } from "./index-Dzf0bJC1.mjs";
|
|
9
9
|
import styled from "styled-components";
|
|
10
10
|
function Role({ oidcRoles, roles, onChangeRole }) {
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
@@ -227,7 +227,7 @@ function Whitelist({
|
|
|
227
227
|
/* @__PURE__ */ jsx(Td, { children: user.email }),
|
|
228
228
|
/* @__PURE__ */ jsx(Td, { children: userRolesNames ? /* @__PURE__ */ jsxs(Flex, { gap: 2, alignItems: "center", children: [
|
|
229
229
|
/* @__PURE__ */ jsx("span", { children: userRolesNames }),
|
|
230
|
-
isDefault && /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral500", children: "
|
|
230
|
+
isDefault && /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral500", children: formatMessage(getTrad("whitelist.table.roles.default")) })
|
|
231
231
|
] }) : "-" }),
|
|
232
232
|
/* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(LocalizedDate, { date: user.createdAt }) }),
|
|
233
233
|
/* @__PURE__ */ jsx(Td, { style: { paddingRight: 0 }, children: /* @__PURE__ */ jsx(
|
|
@@ -91,7 +91,8 @@ const en = {
|
|
|
91
91
|
"unsaved.title": "Unsaved Changes",
|
|
92
92
|
"unsaved.description": "You have unsaved changes that will be lost if you leave. Do you want to continue?",
|
|
93
93
|
"unsaved.confirm": "Leave",
|
|
94
|
-
"unsaved.cancel": "Stay"
|
|
94
|
+
"unsaved.cancel": "Stay",
|
|
95
|
+
"whitelist.table.roles.default": "(Default)"
|
|
95
96
|
};
|
|
96
97
|
function getTrad(id) {
|
|
97
98
|
const pluginIdWithId = `${pluginId}.${id}`;
|
|
@@ -122,7 +123,7 @@ const index = {
|
|
|
122
123
|
defaultMessage: "Configuration"
|
|
123
124
|
},
|
|
124
125
|
Component: async () => {
|
|
125
|
-
return await import("./index-
|
|
126
|
+
return await import("./index-Dz3WlTpL.mjs");
|
|
126
127
|
},
|
|
127
128
|
permissions: [{ action: "plugin::strapi-plugin-oidc.read", subject: null }]
|
|
128
129
|
}
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -313,7 +313,9 @@ async function registerNewUser(userService, oauthService2, roleService2, email,
|
|
|
313
313
|
const oidcRoles = await roleService2.oidcRoles();
|
|
314
314
|
roles2 = oidcRoles?.roles || [];
|
|
315
315
|
}
|
|
316
|
-
const defaultLocale = oauthService2.localeFindByHeader(
|
|
316
|
+
const defaultLocale = oauthService2.localeFindByHeader(
|
|
317
|
+
ctx.request.headers
|
|
318
|
+
);
|
|
317
319
|
const activateUser = await oauthService2.createUser(
|
|
318
320
|
email,
|
|
319
321
|
userResponseData[config2.OIDC_FAMILY_NAME_FIELD],
|
|
@@ -365,9 +367,9 @@ async function oidcSignInCallback(ctx) {
|
|
|
365
367
|
params.append("client_secret", config2.OIDC_CLIENT_SECRET);
|
|
366
368
|
params.append("redirect_uri", config2.OIDC_REDIRECT_URI);
|
|
367
369
|
params.append("grant_type", config2.OIDC_GRANT_TYPE);
|
|
368
|
-
params.append("code_verifier", codeVerifier);
|
|
370
|
+
params.append("code_verifier", codeVerifier ?? "");
|
|
369
371
|
try {
|
|
370
|
-
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce);
|
|
372
|
+
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce ?? "");
|
|
371
373
|
const { activateUser, jwtToken } = await handleUserAuthentication(
|
|
372
374
|
userService,
|
|
373
375
|
oauthService2,
|
package/dist/server/index.mjs
CHANGED
|
@@ -307,7 +307,9 @@ async function registerNewUser(userService, oauthService2, roleService2, email,
|
|
|
307
307
|
const oidcRoles = await roleService2.oidcRoles();
|
|
308
308
|
roles2 = oidcRoles?.roles || [];
|
|
309
309
|
}
|
|
310
|
-
const defaultLocale = oauthService2.localeFindByHeader(
|
|
310
|
+
const defaultLocale = oauthService2.localeFindByHeader(
|
|
311
|
+
ctx.request.headers
|
|
312
|
+
);
|
|
311
313
|
const activateUser = await oauthService2.createUser(
|
|
312
314
|
email,
|
|
313
315
|
userResponseData[config2.OIDC_FAMILY_NAME_FIELD],
|
|
@@ -359,9 +361,9 @@ async function oidcSignInCallback(ctx) {
|
|
|
359
361
|
params.append("client_secret", config2.OIDC_CLIENT_SECRET);
|
|
360
362
|
params.append("redirect_uri", config2.OIDC_REDIRECT_URI);
|
|
361
363
|
params.append("grant_type", config2.OIDC_GRANT_TYPE);
|
|
362
|
-
params.append("code_verifier", codeVerifier);
|
|
364
|
+
params.append("code_verifier", codeVerifier ?? "");
|
|
363
365
|
try {
|
|
364
|
-
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce);
|
|
366
|
+
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce ?? "");
|
|
365
367
|
const { activateUser, jwtToken } = await handleUserAuthentication(
|
|
366
368
|
userService,
|
|
367
369
|
oauthService2,
|
package/package.json
CHANGED