@live-change/user-service 0.9.212 → 0.9.213

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.
Files changed (2) hide show
  1. package/authenticator.js +5 -3
  2. package/package.json +4 -4
package/authenticator.js CHANGED
@@ -23,10 +23,10 @@ definition.authenticator({
23
23
  let userObserver = null
24
24
  let oldCredentials = null
25
25
  await authenticatedTable.object(session).onChange(async (authData, oldAuthData) => {
26
- //output.debug("NEW USER AUTH", authData, "FROM", oldAuthData)
26
+ output.debug("NEW USER AUTH", authData, "FROM", oldAuthData)
27
27
  const newUser = authData ? authData.user : null
28
28
  if(newUser === user) return
29
- //output.debug("USER CHANGE", user, '=>', newUser)
29
+ output.debug("USER CHANGE", user, '=>', newUser)
30
30
  if(user) {
31
31
  if(userObject) {
32
32
  await userObject.unobserve(userObserver)
@@ -44,7 +44,7 @@ definition.authenticator({
44
44
  user,
45
45
  roles: userData.roles
46
46
  } : null
47
- //output.debug("NEW CREDENTIALS", newCredentials)
47
+ output.debug("NEW CREDENTIALS", newCredentials)
48
48
  output.change(newCredentials, oldCredentials)
49
49
  oldCredentials = newCredentials
50
50
  }).then(observer => {
@@ -55,6 +55,8 @@ definition.authenticator({
55
55
  }
56
56
  })
57
57
  } else {
58
+ output.debug("USER NULL", user)
59
+ output.debug("OLD CREDENTIALS", oldCredentials)
58
60
  user = null
59
61
  output.change(null, oldCredentials)
60
62
  oldCredentials = null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-service",
3
- "version": "0.9.212",
3
+ "version": "0.9.213",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/framework": "^0.9.212",
26
- "@live-change/relations-plugin": "^0.9.212",
25
+ "@live-change/framework": "^0.9.213",
26
+ "@live-change/relations-plugin": "^0.9.213",
27
27
  "pluralize": "^8.0.0"
28
28
  },
29
- "gitHead": "40268236c57d5f123c1e8f1815c310464d043d52"
29
+ "gitHead": "1e22d761822df56c327242bccb3d7aed57631146"
30
30
  }