@cocreate/users 1.22.4 → 1.22.6
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 +14 -0
- package/package.json +1 -1
- package/src/client.js +2 -0
- package/src/server.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.22.6](https://github.com/CoCreate-app/CoCreate-users/compare/v1.22.5...v1.22.6) (2023-05-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* renamed authInstance to authenticate ([64554c1](https://github.com/CoCreate-app/CoCreate-users/commit/64554c164582d7950319aca24f3802d7be31325f))
|
|
7
|
+
|
|
8
|
+
## [1.22.5](https://github.com/CoCreate-app/CoCreate-users/compare/v1.22.4...v1.22.5) (2023-05-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Add indexedDB support and remove db property when signing in. ([7979c19](https://github.com/CoCreate-app/CoCreate-users/commit/7979c192bd21905437aa65893b7a9600793e7fbc))
|
|
14
|
+
|
|
1
15
|
## [1.22.4](https://github.com/CoCreate-app/CoCreate-users/compare/v1.22.3...v1.22.4) (2023-05-21)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -94,6 +94,7 @@ const CoCreateUser = {
|
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
let request = {
|
|
97
|
+
db: 'indexeddb',
|
|
97
98
|
collection,
|
|
98
99
|
// document: {
|
|
99
100
|
// lastSignIn: new Date().toISOString()
|
|
@@ -119,6 +120,7 @@ const CoCreateUser = {
|
|
|
119
120
|
})
|
|
120
121
|
} else {
|
|
121
122
|
request.broadcastBrowser = false
|
|
123
|
+
delete request.db
|
|
122
124
|
crud.socket.send('signIn', request).then((response) => {
|
|
123
125
|
this.signInResponse(response)
|
|
124
126
|
})
|
package/src/server.js
CHANGED
|
@@ -57,9 +57,9 @@ class CoCreateUser {
|
|
|
57
57
|
uid: data.uid
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
if (data.document[0] && data.document[0]._id && self.wsManager.
|
|
60
|
+
if (data.document[0] && data.document[0]._id && self.wsManager.authenticate) {
|
|
61
61
|
const user_id = data.document[0].key
|
|
62
|
-
const token = await self.wsManager.
|
|
62
|
+
const token = await self.wsManager.authenticate.generateToken({ user_id });
|
|
63
63
|
|
|
64
64
|
if (token && token != 'null') {
|
|
65
65
|
response = {
|