@nocobase/auth 2.1.0-beta.15 → 2.1.0-beta.17
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/lib/auth-manager.js
CHANGED
|
@@ -146,7 +146,7 @@ const _AuthManager = class _AuthManager {
|
|
|
146
146
|
if (process.env.UNSAFE_USE_DEFAULT_JWT_SECRET === "true") {
|
|
147
147
|
return process.env.APP_KEY;
|
|
148
148
|
}
|
|
149
|
-
const jwtSecretPath =
|
|
149
|
+
const jwtSecretPath = (0, import_utils.storagePathJoin)("apps", "main", "jwt_secret.dat");
|
|
150
150
|
const jwtSecretExists = import_fs.default.existsSync(jwtSecretPath);
|
|
151
151
|
if (jwtSecretExists) {
|
|
152
152
|
const key2 = import_fs.default.readFileSync(jwtSecretPath);
|
package/lib/base/jwt-service.js
CHANGED
|
@@ -57,6 +57,9 @@ const _JwtService = class _JwtService {
|
|
|
57
57
|
secret() {
|
|
58
58
|
return this.options.secret;
|
|
59
59
|
}
|
|
60
|
+
getSecret() {
|
|
61
|
+
return this.secret();
|
|
62
|
+
}
|
|
60
63
|
/* istanbul ignore next -- @preserve */
|
|
61
64
|
sign(payload, options) {
|
|
62
65
|
const opt = { expiresIn: this.expiresIn(), ...options };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/auth",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
10
|
-
"@nocobase/cache": "2.1.0-beta.
|
|
11
|
-
"@nocobase/database": "2.1.0-beta.
|
|
12
|
-
"@nocobase/resourcer": "2.1.0-beta.
|
|
13
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
9
|
+
"@nocobase/actions": "2.1.0-beta.17",
|
|
10
|
+
"@nocobase/cache": "2.1.0-beta.17",
|
|
11
|
+
"@nocobase/database": "2.1.0-beta.17",
|
|
12
|
+
"@nocobase/resourcer": "2.1.0-beta.17",
|
|
13
|
+
"@nocobase/utils": "2.1.0-beta.17",
|
|
14
14
|
"@types/jsonwebtoken": "^9.0.9",
|
|
15
15
|
"jsonwebtoken": "^9.0.2"
|
|
16
16
|
},
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
20
20
|
"directory": "packages/auth"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "227d625e47174ab7b3a90170e7c6c67bbdf36e23"
|
|
23
23
|
}
|