@semapps/auth 0.4.0-alpha.25 → 0.4.0-alpha.28

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.
@@ -40,7 +40,11 @@ const AuthSSOMixin = {
40
40
  throw new Error('registration.not-allowed');
41
41
  }
42
42
 
43
- accountData = await ctx.call('auth.account.create', { uuid: profileData.uuid, email: profileData.email, username: profileData.username });
43
+ accountData = await ctx.call('auth.account.create', {
44
+ uuid: profileData.uuid,
45
+ email: profileData.email,
46
+ username: profileData.username
47
+ });
44
48
  webId = await ctx.call('webid.create', this.pickWebIdData({ nick: accountData.username, ...profileData }));
45
49
  newUser = true;
46
50
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@semapps/auth",
3
- "version": "0.4.0-alpha.25",
3
+ "version": "0.4.0-alpha.28",
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.25",
9
- "@semapps/triplestore": "0.4.0-alpha.25",
8
+ "@semapps/mime-types": "0.4.0-alpha.28",
9
+ "@semapps/triplestore": "0.4.0-alpha.28",
10
10
  "bcrypt": "^5.0.1",
11
11
  "express-session": "^1.17.0",
12
12
  "jsonwebtoken": "^8.5.1",
@@ -24,5 +24,5 @@
24
24
  "publishConfig": {
25
25
  "access": "public"
26
26
  },
27
- "gitHead": "50f9339117c5ed5e303f6d760835497890da32b1"
27
+ "gitHead": "dd181d1fc5af35e7f39b9363a873364550872b33"
28
28
  }
@@ -29,12 +29,13 @@ module.exports = {
29
29
  } else {
30
30
  // If username is not provided, find an username based on the email
31
31
  const usernameFromEmail = email.split('@')[0].toLowerCase();
32
- let usernameValid = false, i = 0;
32
+ let usernameValid = false,
33
+ i = 0;
33
34
  do {
34
35
  username = i === 0 ? usernameFromEmail : usernameFromEmail + i;
35
36
  try {
36
37
  usernameValid = await this.isValidUsername(ctx, username);
37
- } catch(e) {
38
+ } catch (e) {
38
39
  // Do nothing, the loop will continue
39
40
  }
40
41
  i++;