@nocobase/auth 2.1.0-beta.15 → 2.1.0-beta.16

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.
@@ -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 = import_path.default.resolve(process.cwd(), "storage", "apps", "main", "jwt_secret.dat");
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);
@@ -20,6 +20,7 @@ export declare class JwtService {
20
20
  blacklist: ITokenBlacklistService;
21
21
  private expiresIn;
22
22
  private secret;
23
+ getSecret(): string | Buffer;
23
24
  sign(payload: SignPayload, options?: SignOptions): string;
24
25
  decode(token: string): Promise<JwtPayload>;
25
26
  /**
@@ -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.15",
3
+ "version": "2.1.0-beta.16",
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.15",
10
- "@nocobase/cache": "2.1.0-beta.15",
11
- "@nocobase/database": "2.1.0-beta.15",
12
- "@nocobase/resourcer": "2.1.0-beta.15",
13
- "@nocobase/utils": "2.1.0-beta.15",
9
+ "@nocobase/actions": "2.1.0-beta.16",
10
+ "@nocobase/cache": "2.1.0-beta.16",
11
+ "@nocobase/database": "2.1.0-beta.16",
12
+ "@nocobase/resourcer": "2.1.0-beta.16",
13
+ "@nocobase/utils": "2.1.0-beta.16",
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": "dc1aceea6357e6ab149976c2a236fc4b6bee1370"
22
+ "gitHead": "b9a191705a440a336c85d82fd877fdf152bec70f"
23
23
  }