@strapi/plugin-users-permissions 4.0.5 → 4.0.6

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.
@@ -28,12 +28,12 @@ const Input = ({
28
28
 
29
29
  const label = formatMessage(
30
30
  { id: intlLabel.id, defaultMessage: intlLabel.defaultMessage },
31
- { ...intlLabel.values }
31
+ { provider: providerToEditName, ...intlLabel.values }
32
32
  );
33
33
  const hint = description
34
34
  ? formatMessage(
35
35
  { id: description.id, defaultMessage: description.defaultMessage },
36
- { ...description.values }
36
+ { provider: providerToEditName, ...description.values }
37
37
  )
38
38
  : '';
39
39
 
@@ -23,9 +23,6 @@ const keyLabel = { id: getTrad('PopUpForm.Providers.key.label'), defaultMessage:
23
23
  const hintLabel = {
24
24
  id: getTrad('PopUpForm.Providers.redirectURL.label'),
25
25
  defaultMessage: 'The redirect URL to add in your {provider} application configurations',
26
- values: {
27
- provider: 'VK',
28
- },
29
26
  };
30
27
  const textPlaceholder = {
31
28
  id: getTrad('PopUpForm.Providers.key.placeholder'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-users-permissions",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "Protect your API with a full-authentication process based on JWT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@purest/providers": "^1.0.2",
31
- "@strapi/helper-plugin": "4.0.5",
32
- "@strapi/utils": "4.0.5",
31
+ "@strapi/helper-plugin": "4.0.6",
32
+ "@strapi/utils": "4.0.6",
33
33
  "bcryptjs": "2.4.3",
34
34
  "grant-koa": "5.4.8",
35
35
  "jsonwebtoken": "^8.1.0",
@@ -61,5 +61,5 @@
61
61
  "required": true,
62
62
  "kind": "plugin"
63
63
  },
64
- "gitHead": "45020eee065af8917011cc43398f95c4c624d6ad"
64
+ "gitHead": "5b48053946aacfb564ff423342fe70d79cd6d66d"
65
65
  }
@@ -32,6 +32,9 @@ module.exports = async ({ strapi }) => {
32
32
 
33
33
  if (!process.env.JWT_SECRET) {
34
34
  strapi.fs.appendFile(process.env.ENV_PATH || '.env', `JWT_SECRET=${jwtSecret}\n`);
35
+ strapi.log.info(
36
+ 'The Users & Permissions plugin automatically generated a jwt secret and stored it in your .env file under the name JWT_SECRET.'
37
+ );
35
38
  }
36
39
  }
37
40
  };
@@ -188,7 +188,10 @@ module.exports = {
188
188
  }
189
189
 
190
190
  // Ability to pass OAuth callback dynamically
191
- grantConfig[provider].callback = _.get(ctx, 'query.callback') || grantConfig[provider].callback;
191
+ grantConfig[provider].callback =
192
+ _.get(ctx, 'query.callback') ||
193
+ _.get(ctx, 'session.grant.dynamic.callback') ||
194
+ grantConfig[provider].callback;
192
195
  grantConfig[provider].redirect_uri = getService('providers').buildRedirectUri(provider);
193
196
 
194
197
  return grant(grantConfig)(ctx, next);
@@ -21,8 +21,6 @@ module.exports = ({ strapi }) => ({
21
21
  }
22
22
 
23
23
  token = parts[1];
24
- } else if (ctx.query.access_token) {
25
- token = ctx.query.access_token;
26
24
  } else {
27
25
  return null;
28
26
  }