strapi-plugin-oidc 1.4.1 → 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 +6 -3
- package/dist/server/index.mjs +6 -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
|
@@ -30,6 +30,7 @@ async function bootstrap({ strapi: strapi2 }) {
|
|
|
30
30
|
const authRoutes = [
|
|
31
31
|
`${adminUrl}/login`,
|
|
32
32
|
`${adminUrl}/register`,
|
|
33
|
+
`${adminUrl}/register-admin`,
|
|
33
34
|
`${adminUrl}/forgot-password`,
|
|
34
35
|
`${adminUrl}/reset-password`
|
|
35
36
|
];
|
|
@@ -312,7 +313,9 @@ async function registerNewUser(userService, oauthService2, roleService2, email,
|
|
|
312
313
|
const oidcRoles = await roleService2.oidcRoles();
|
|
313
314
|
roles2 = oidcRoles?.roles || [];
|
|
314
315
|
}
|
|
315
|
-
const defaultLocale = oauthService2.localeFindByHeader(
|
|
316
|
+
const defaultLocale = oauthService2.localeFindByHeader(
|
|
317
|
+
ctx.request.headers
|
|
318
|
+
);
|
|
316
319
|
const activateUser = await oauthService2.createUser(
|
|
317
320
|
email,
|
|
318
321
|
userResponseData[config2.OIDC_FAMILY_NAME_FIELD],
|
|
@@ -364,9 +367,9 @@ async function oidcSignInCallback(ctx) {
|
|
|
364
367
|
params.append("client_secret", config2.OIDC_CLIENT_SECRET);
|
|
365
368
|
params.append("redirect_uri", config2.OIDC_REDIRECT_URI);
|
|
366
369
|
params.append("grant_type", config2.OIDC_GRANT_TYPE);
|
|
367
|
-
params.append("code_verifier", codeVerifier);
|
|
370
|
+
params.append("code_verifier", codeVerifier ?? "");
|
|
368
371
|
try {
|
|
369
|
-
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce);
|
|
372
|
+
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce ?? "");
|
|
370
373
|
const { activateUser, jwtToken } = await handleUserAuthentication(
|
|
371
374
|
userService,
|
|
372
375
|
oauthService2,
|
package/dist/server/index.mjs
CHANGED
|
@@ -24,6 +24,7 @@ async function bootstrap({ strapi: strapi2 }) {
|
|
|
24
24
|
const authRoutes = [
|
|
25
25
|
`${adminUrl}/login`,
|
|
26
26
|
`${adminUrl}/register`,
|
|
27
|
+
`${adminUrl}/register-admin`,
|
|
27
28
|
`${adminUrl}/forgot-password`,
|
|
28
29
|
`${adminUrl}/reset-password`
|
|
29
30
|
];
|
|
@@ -306,7 +307,9 @@ async function registerNewUser(userService, oauthService2, roleService2, email,
|
|
|
306
307
|
const oidcRoles = await roleService2.oidcRoles();
|
|
307
308
|
roles2 = oidcRoles?.roles || [];
|
|
308
309
|
}
|
|
309
|
-
const defaultLocale = oauthService2.localeFindByHeader(
|
|
310
|
+
const defaultLocale = oauthService2.localeFindByHeader(
|
|
311
|
+
ctx.request.headers
|
|
312
|
+
);
|
|
310
313
|
const activateUser = await oauthService2.createUser(
|
|
311
314
|
email,
|
|
312
315
|
userResponseData[config2.OIDC_FAMILY_NAME_FIELD],
|
|
@@ -358,9 +361,9 @@ async function oidcSignInCallback(ctx) {
|
|
|
358
361
|
params.append("client_secret", config2.OIDC_CLIENT_SECRET);
|
|
359
362
|
params.append("redirect_uri", config2.OIDC_REDIRECT_URI);
|
|
360
363
|
params.append("grant_type", config2.OIDC_GRANT_TYPE);
|
|
361
|
-
params.append("code_verifier", codeVerifier);
|
|
364
|
+
params.append("code_verifier", codeVerifier ?? "");
|
|
362
365
|
try {
|
|
363
|
-
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce);
|
|
366
|
+
const userResponseData = await exchangeTokenAndFetchUserInfo(config2, params, oidcNonce ?? "");
|
|
364
367
|
const { activateUser, jwtToken } = await handleUserAuthentication(
|
|
365
368
|
userService,
|
|
366
369
|
oauthService2,
|
package/package.json
CHANGED