@jetthai/cuora 1.0.182 → 1.0.183
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 +2 -0
- package/dist/bundle.mjs +35 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.0.183](https://github.com/jetthai/cuora-module/compare/v1.0.182...v1.0.183) (2022-10-03)
|
|
6
|
+
|
|
5
7
|
### [1.0.182](https://github.com/jetthai/cuora-module/compare/v1.0.181...v1.0.182) (2022-10-03)
|
|
6
8
|
|
|
7
9
|
### [1.0.181](https://github.com/jetthai/cuora-module/compare/v1.0.180...v1.0.181) (2022-09-29)
|
package/dist/bundle.mjs
CHANGED
|
@@ -67,6 +67,21 @@ var auth$1 = {
|
|
|
67
67
|
isPublic: true,
|
|
68
68
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
69
69
|
}),
|
|
70
|
+
loginApp: ({ id, provider, displayName, pictureUrl, accessToken }) => ({
|
|
71
|
+
url: 'appLogin',
|
|
72
|
+
method: 'post',
|
|
73
|
+
params: {
|
|
74
|
+
provider,
|
|
75
|
+
data: {
|
|
76
|
+
id,
|
|
77
|
+
provider,
|
|
78
|
+
displayName,
|
|
79
|
+
pictureUrl,
|
|
80
|
+
accessToken,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
isPublic: true,
|
|
84
|
+
}),
|
|
70
85
|
register: ({ channel = 'official', subchannel = 'pwa', reCaptchaToken, dt, ...rest }) => ({
|
|
71
86
|
url: `register?channel=${channel}&subchannel=${subchannel}`,
|
|
72
87
|
method: 'post',
|
|
@@ -10161,6 +10176,19 @@ function auth (request) {
|
|
|
10161
10176
|
},
|
|
10162
10177
|
},
|
|
10163
10178
|
},
|
|
10179
|
+
authenticationApp: {
|
|
10180
|
+
invoke: {
|
|
10181
|
+
src: 'authenticateApp',
|
|
10182
|
+
onDone: {
|
|
10183
|
+
target: 'authenticated',
|
|
10184
|
+
actions: ['setToken'],
|
|
10185
|
+
},
|
|
10186
|
+
onError: {
|
|
10187
|
+
target: 'idle',
|
|
10188
|
+
actions: 'removeToken',
|
|
10189
|
+
},
|
|
10190
|
+
},
|
|
10191
|
+
},
|
|
10164
10192
|
authenticated: {
|
|
10165
10193
|
invoke: {
|
|
10166
10194
|
src: 'fetchUserInfo',
|
|
@@ -10273,6 +10301,9 @@ function auth (request) {
|
|
|
10273
10301
|
LOGIN_3PARTY: {
|
|
10274
10302
|
actions: 'redirectTo3Party',
|
|
10275
10303
|
},
|
|
10304
|
+
LOGIN_APP: {
|
|
10305
|
+
actions: '.authenticationApp'
|
|
10306
|
+
},
|
|
10276
10307
|
SET_PLAY: {
|
|
10277
10308
|
actions: 'setPlay',
|
|
10278
10309
|
},
|
|
@@ -10431,6 +10462,10 @@ function auth (request) {
|
|
|
10431
10462
|
}),
|
|
10432
10463
|
},
|
|
10433
10464
|
services: {
|
|
10465
|
+
authenticateApp: async (context, event) => {
|
|
10466
|
+
const { token } = await request.send(auth$1.loginApp(event.data));
|
|
10467
|
+
return token
|
|
10468
|
+
},
|
|
10434
10469
|
authenticate: async (context, event) => {
|
|
10435
10470
|
const data = { ...context.loginData, reCaptchaToken: context.reCaptchaToken };
|
|
10436
10471
|
const { token } = await request.send(auth$1.login(data));
|