@jetthai/cuora 1.1.332-dev-4 → 1.1.332-dev-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 +6 -0
- package/package.json +3 -2
- package/src/api/auth.js +2 -2
- package/src/machine/auth.js +16 -0
- package/src/request/request.js +0 -1
- package/src/util/deviceToken.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.332-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.332-dev-5...v1.1.332-dev-6) (2024-12-29)
|
|
6
|
+
|
|
7
|
+
### [1.1.332-tg](https://github.com/jetthai/cuora-module/compare/v1.1.332...v1.1.332-tg) (2024-12-25)
|
|
8
|
+
|
|
9
|
+
### [1.1.332-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.332-dev-4...v1.1.332-dev-5) (2024-12-28)
|
|
10
|
+
|
|
5
11
|
### [1.1.332-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.332...v1.1.332-dev-4) (2024-12-28)
|
|
6
12
|
|
|
7
13
|
### [1.1.332](https://github.com/jetthai/cuora-module/compare/v1.1.331...v1.1.332) (2024-12-24)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetthai/cuora",
|
|
3
|
-
"version": "1.1.332-dev-
|
|
3
|
+
"version": "1.1.332-dev-6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"ua-parser-js": "^0.7.34",
|
|
26
26
|
"universal-cookie": "^4.0.4",
|
|
27
27
|
"url-join": "^4.0.1",
|
|
28
|
-
"xstate": "^4.25.0"
|
|
28
|
+
"xstate": "^4.25.0",
|
|
29
|
+
"socket.io-client": "^4.8.0"
|
|
29
30
|
}
|
|
30
31
|
}
|
package/src/api/auth.js
CHANGED
|
@@ -5,10 +5,10 @@ export default {
|
|
|
5
5
|
method: 'post',
|
|
6
6
|
isPublic: true,
|
|
7
7
|
}),
|
|
8
|
-
login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken }) => ({
|
|
8
|
+
login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken, additionalUserInfo, loginType, isSignature }) => ({
|
|
9
9
|
url: 'login',
|
|
10
10
|
method: 'post',
|
|
11
|
-
params: { username, password, provider, countryCode, phone, email, dt },
|
|
11
|
+
params: { username, password, provider, countryCode, phone, email, dt, additionalUserInfo, loginType, isSignature },
|
|
12
12
|
isPublic: true,
|
|
13
13
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
14
14
|
}),
|
package/src/machine/auth.js
CHANGED
|
@@ -33,6 +33,7 @@ export default function (request) {
|
|
|
33
33
|
email: null,
|
|
34
34
|
username: null,
|
|
35
35
|
password: null,
|
|
36
|
+
additionalUserInfo: null,
|
|
36
37
|
},
|
|
37
38
|
countryAbbr: null,
|
|
38
39
|
userInfo: {},
|
|
@@ -271,6 +272,10 @@ export default function (request) {
|
|
|
271
272
|
LOGIN_APP: {
|
|
272
273
|
target: '.authenticationApp',
|
|
273
274
|
},
|
|
275
|
+
LOGIN_TELEGRAM: {
|
|
276
|
+
target: '.authentication',
|
|
277
|
+
actions: 'setLoginTelegram',
|
|
278
|
+
},
|
|
274
279
|
SET_PLAY: {
|
|
275
280
|
actions: 'setPlay',
|
|
276
281
|
},
|
|
@@ -353,6 +358,17 @@ export default function (request) {
|
|
|
353
358
|
},
|
|
354
359
|
}
|
|
355
360
|
}),
|
|
361
|
+
setLoginTelegram: assign((context, event) => {
|
|
362
|
+
const { loginType, additionalUserInfo, isSignature } = event.data
|
|
363
|
+
return {
|
|
364
|
+
loginData: {
|
|
365
|
+
provider: 'telegram',
|
|
366
|
+
loginType,
|
|
367
|
+
additionalUserInfo,
|
|
368
|
+
isSignature,
|
|
369
|
+
},
|
|
370
|
+
}
|
|
371
|
+
}),
|
|
356
372
|
fetchToken: assign((context, event) => {
|
|
357
373
|
const token = storage.get(tokenKey)
|
|
358
374
|
return {
|
package/src/request/request.js
CHANGED
package/src/util/deviceToken.js
CHANGED
|
@@ -23,7 +23,6 @@ const getDeviceToken = async ({ fpToken, sentry, hosts, enable = true }) => {
|
|
|
23
23
|
throw new Error('[Device Token] No token from FingerprintJS.')
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
console.log('[Device Token]', `${dt} from ${endpoints}`)
|
|
27
26
|
sentry?.setTag('dt', dt)
|
|
28
27
|
} catch (error) {
|
|
29
28
|
console.error('[Device Token]', `${dt} from ${endpoints}`, error)
|