@semapps/auth 0.8.5 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  const sendToken = (req, res) => {
2
2
  res.setHeader('Content-Type', 'application/json');
3
- res.end(JSON.stringify({ token: req.user.token, newUser: req.user.newUser }));
3
+ res.end(JSON.stringify({ token: req.user.token, webId: req.user.webId, newUser: req.user.newUser }));
4
4
  };
5
5
 
6
6
  module.exports = sendToken;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@semapps/auth",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "description": "Authentification module for SemApps",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Virtual Assembly",
7
7
  "dependencies": {
8
- "@semapps/ldp": "0.8.5",
9
- "@semapps/middlewares": "0.8.5",
10
- "@semapps/mime-types": "0.8.5",
11
- "@semapps/triplestore": "0.8.5",
8
+ "@semapps/ldp": "0.8.7",
9
+ "@semapps/middlewares": "0.8.7",
10
+ "@semapps/mime-types": "0.8.7",
11
+ "@semapps/triplestore": "0.8.7",
12
12
  "bcrypt": "^5.0.1",
13
13
  "express-session": "^1.17.0",
14
14
  "jsonwebtoken": "^8.5.1",
@@ -29,5 +29,5 @@
29
29
  "engines": {
30
30
  "node": ">=14"
31
31
  },
32
- "gitHead": "ee84441fa453484498a9a52d211ec277d0699d62"
32
+ "gitHead": "e08b21632d850b64511a6b735a82e1664c18a627"
33
33
  }
@@ -62,7 +62,11 @@ const AuthLocalService = {
62
62
  });
63
63
 
64
64
  const profileData = { nick: username, email, ...rest };
65
- const webId = await ctx.call('webid.createWebId', this.pickWebIdData(profileData));
65
+ const webId = await ctx.call('webid.createWebId', this.pickWebIdData(profileData), {
66
+ meta: {
67
+ isSignup: true // Allow services to handle directly the webId creation if it is generated by the AuthService
68
+ }
69
+ });
66
70
 
67
71
  // Link the webId with the account
68
72
  accountData = await ctx.call('auth.account.attachWebId', { accountUri: accountData['@id'], webId });