@cocreate/users 1.5.3 → 1.5.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.5.4](https://github.com/CoCreate-app/CoCreate-users/compare/v1.5.3...v1.5.4) (2022-05-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * convert user_id object_id to string ([bec7113](https://github.com/CoCreate-app/CoCreate-users/commit/bec711359b99594c0a6207ca478a73968dbc0a41))
7
+
1
8
  ## [1.5.3](https://github.com/CoCreate-app/CoCreate-users/compare/v1.5.2...v1.5.3) (2022-05-06)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/users",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "A simple users component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "users",
package/src/server.js CHANGED
@@ -114,7 +114,8 @@ class CoCreateUser {
114
114
  if (!error && result && result.length > 0) {
115
115
  let token = null;
116
116
  if (self.wsManager.authInstance) {
117
- token = await self.wsManager.authInstance.generateToken({user_id: result[0]['_id']});
117
+ console.log('login user_id: ', `${result[0]['_id']}`)
118
+ token = await self.wsManager.authInstance.generateToken({user_id: `${result[0]['_id']}`});
118
119
  }
119
120
 
120
121
  response = { ...response,
@@ -128,7 +129,6 @@ class CoCreateUser {
128
129
  token
129
130
  };
130
131
  }
131
- console.log('before socket', response);
132
132
  self.wsManager.send(socket, 'login', response, req_data['organization_id'])
133
133
  console.log('success socket', req_data['organization_id']);
134
134
  });