strapi-identity 0.0.2-debug.0 → 0.0.2-debug.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.
- package/README.md +8 -2
- package/dist/server/index.js +1 -4
- package/dist/server/index.mjs +1 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,14 @@ Detailed Multi-Factor Authentication (MFA) plugin for Strapi v5+. Secure your St
|
|
|
21
21
|
|
|
22
22
|
To install this plugin, you'll need to include it in your Strapi project.
|
|
23
23
|
|
|
24
|
-
1. **Install the dependency
|
|
24
|
+
1. **Install the dependency**:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install strapi-identity
|
|
28
|
+
# or
|
|
29
|
+
yarn add strapi-identity
|
|
30
|
+
```
|
|
31
|
+
|
|
25
32
|
2. **Enable the plugin** in `config/plugins.ts`:
|
|
26
33
|
|
|
27
34
|
```typescript
|
|
@@ -29,7 +36,6 @@ export default {
|
|
|
29
36
|
// ...
|
|
30
37
|
'strapi-identity': {
|
|
31
38
|
enabled: true,
|
|
32
|
-
resolve: './src/plugins/strapi-identity', // If local
|
|
33
39
|
},
|
|
34
40
|
// ...
|
|
35
41
|
};
|
package/dist/server/index.js
CHANGED
|
@@ -9422,13 +9422,10 @@ const controller = ({ strapi: strapi2 }) => ({
|
|
|
9422
9422
|
);
|
|
9423
9423
|
const accessResult = await sessionManager("admin").generateAccessToken(refreshToken);
|
|
9424
9424
|
const { token: accessToken } = accessResult;
|
|
9425
|
-
const configuredSecure = strapi2.config.get("admin.auth.cookie.secure");
|
|
9426
|
-
const isProduction = process.env.NODE_ENV === "production";
|
|
9427
|
-
const isSecure = typeof configuredSecure === "boolean" ? configuredSecure : isProduction;
|
|
9428
9425
|
const domain = strapi2.config.get("admin.auth.domain");
|
|
9429
9426
|
ctx.cookies.set("jwtToken", accessToken, {
|
|
9430
9427
|
httpOnly: false,
|
|
9431
|
-
secure:
|
|
9428
|
+
secure: ctx.request.secure,
|
|
9432
9429
|
overwrite: true,
|
|
9433
9430
|
domain
|
|
9434
9431
|
});
|
package/dist/server/index.mjs
CHANGED
|
@@ -9416,13 +9416,10 @@ const controller = ({ strapi: strapi2 }) => ({
|
|
|
9416
9416
|
);
|
|
9417
9417
|
const accessResult = await sessionManager("admin").generateAccessToken(refreshToken);
|
|
9418
9418
|
const { token: accessToken } = accessResult;
|
|
9419
|
-
const configuredSecure = strapi2.config.get("admin.auth.cookie.secure");
|
|
9420
|
-
const isProduction = process.env.NODE_ENV === "production";
|
|
9421
|
-
const isSecure = typeof configuredSecure === "boolean" ? configuredSecure : isProduction;
|
|
9422
9419
|
const domain = strapi2.config.get("admin.auth.domain");
|
|
9423
9420
|
ctx.cookies.set("jwtToken", accessToken, {
|
|
9424
9421
|
httpOnly: false,
|
|
9425
|
-
secure:
|
|
9422
|
+
secure: ctx.request.secure,
|
|
9426
9423
|
overwrite: true,
|
|
9427
9424
|
domain
|
|
9428
9425
|
});
|
package/package.json
CHANGED