@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.
@@ -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
- else
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.97",
3
+ "version": "1.2.98",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -203,8 +203,16 @@ export class ServiceApp<
203
203
  }
204
204
 
205
205
  // Login
206
- if (appApi) appApi.authorize(serviceResult.data.token);
207
- else this.userLoginEx(userData, refreshToken, serviceResult.data);
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);