@etsoo/materialui 1.2.97 → 1.2.98
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/lib/app/ServiceApp.js +8 -2
- package/package.json +1 -1
- package/src/app/ServiceApp.ts +10 -2
package/lib/app/ServiceApp.js
CHANGED
|
@@ -137,10 +137,16 @@ export class ServiceApp extends ReactApp {
|
|
|
137
137
|
return false;
|
|
138
138
|
}
|
|
139
139
|
// Login
|
|
140
|
-
if (appApi)
|
|
140
|
+
if (appApi) {
|
|
141
|
+
// Authorize external service application API
|
|
141
142
|
appApi.authorize(serviceResult.data.token);
|
|
142
|
-
|
|
143
|
+
// Update core system token, otherwise will be failed for upcoming calls
|
|
144
|
+
this.userLogin(userData, refreshToken, true);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
// Authorize local service
|
|
143
148
|
this.userLoginEx(userData, refreshToken, serviceResult.data);
|
|
149
|
+
}
|
|
144
150
|
// Success callback
|
|
145
151
|
if (failCallback)
|
|
146
152
|
failCallback(true);
|
package/package.json
CHANGED
package/src/app/ServiceApp.ts
CHANGED
|
@@ -203,8 +203,16 @@ export class ServiceApp<
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
// Login
|
|
206
|
-
if (appApi)
|
|
207
|
-
|
|
206
|
+
if (appApi) {
|
|
207
|
+
// Authorize external service application API
|
|
208
|
+
appApi.authorize(serviceResult.data.token);
|
|
209
|
+
|
|
210
|
+
// Update core system token, otherwise will be failed for upcoming calls
|
|
211
|
+
this.userLogin(userData, refreshToken, true);
|
|
212
|
+
} else {
|
|
213
|
+
// Authorize local service
|
|
214
|
+
this.userLoginEx(userData, refreshToken, serviceResult.data);
|
|
215
|
+
}
|
|
208
216
|
|
|
209
217
|
// Success callback
|
|
210
218
|
if (failCallback) failCallback(true);
|