@semapps/auth 0.8.6 → 0.8.8

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.6",
3
+ "version": "0.8.8",
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.6",
9
- "@semapps/middlewares": "0.8.6",
10
- "@semapps/mime-types": "0.8.6",
11
- "@semapps/triplestore": "0.8.6",
8
+ "@semapps/ldp": "0.8.8",
9
+ "@semapps/middlewares": "0.8.8",
10
+ "@semapps/mime-types": "0.8.8",
11
+ "@semapps/triplestore": "0.8.8",
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": "8431d0ecf0cc3fe9c6bb71ffb5985f1401126f24"
32
+ "gitHead": "ace1f82c14c082cc24cc9d8498748c7458d96602"
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 });