@semapps/auth 0.4.0-alpha.5 → 0.4.0-alpha.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.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@semapps/auth",
3
- "version": "0.4.0-alpha.5",
3
+ "version": "0.4.0-alpha.6",
4
4
  "description": "Authentification module for SemApps",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Virtual Assembly",
7
7
  "dependencies": {
8
- "@semapps/mime-types": "0.4.0-alpha.5",
9
- "@semapps/triplestore": "0.4.0-alpha.5",
8
+ "@semapps/mime-types": "0.4.0-alpha.6",
9
+ "@semapps/triplestore": "0.4.0-alpha.6",
10
10
  "bcrypt": "^5.0.1",
11
11
  "express-session": "^1.17.0",
12
12
  "jsonwebtoken": "^8.5.1",
@@ -22,5 +22,5 @@
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
25
- "gitHead": "c578b6ace4bdf91965cac4431a3ba6810feab0c8"
25
+ "gitHead": "10597bcc2e3f858149820d29f4f93901f1af92bf"
26
26
  }
@@ -93,7 +93,7 @@ module.exports = {
93
93
  const account = await ctx.call('auth.account.findByWebId', { webId });
94
94
 
95
95
  return await this._update(ctx, {
96
- '@id': account.id,
96
+ '@id': account['@id'],
97
97
  hashedPassword
98
98
  });
99
99
  }
package/services/jwt.js CHANGED
@@ -14,6 +14,9 @@ module.exports = {
14
14
 
15
15
  if (!fs.existsSync(privateKeyPath) && !fs.existsSync(publicKeyPath)) {
16
16
  console.log('JWT keypair not found, generating...');
17
+ if (!fs.existsSync(this.settings.jwtPath)) {
18
+ fs.mkdirSync(this.settings.jwtPath);
19
+ }
17
20
  await this.actions.generateKeyPair({ privateKeyPath, publicKeyPath });
18
21
  }
19
22