@etsoo/appscript 1.5.30 → 1.5.31
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/cjs/app/CoreApp.js +13 -7
- package/lib/mjs/app/CoreApp.js +13 -7
- package/package.json +1 -1
- package/src/app/CoreApp.ts +16 -10
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -1549,13 +1549,19 @@ class CoreApp {
|
|
|
1549
1549
|
* @param apiUrl Signout API URL
|
|
1550
1550
|
*/
|
|
1551
1551
|
async signout() {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1552
|
+
const token = this.getCacheToken();
|
|
1553
|
+
if (token) {
|
|
1554
|
+
await this.api.put('Auth/Signout', {
|
|
1555
|
+
deviceId: this.deviceId,
|
|
1556
|
+
token: this.encrypt(token)
|
|
1557
|
+
}, {
|
|
1558
|
+
onError: (error) => {
|
|
1559
|
+
console.error('CoreApp.signout error', error);
|
|
1560
|
+
// Prevent further processing
|
|
1561
|
+
return false;
|
|
1562
|
+
}
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1559
1565
|
// Clear, noTrigger = true, avoid state update
|
|
1560
1566
|
this.userLogout(true, true);
|
|
1561
1567
|
// Go to login page
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -1546,13 +1546,19 @@ export class CoreApp {
|
|
|
1546
1546
|
* @param apiUrl Signout API URL
|
|
1547
1547
|
*/
|
|
1548
1548
|
async signout() {
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1549
|
+
const token = this.getCacheToken();
|
|
1550
|
+
if (token) {
|
|
1551
|
+
await this.api.put('Auth/Signout', {
|
|
1552
|
+
deviceId: this.deviceId,
|
|
1553
|
+
token: this.encrypt(token)
|
|
1554
|
+
}, {
|
|
1555
|
+
onError: (error) => {
|
|
1556
|
+
console.error('CoreApp.signout error', error);
|
|
1557
|
+
// Prevent further processing
|
|
1558
|
+
return false;
|
|
1559
|
+
}
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1556
1562
|
// Clear, noTrigger = true, avoid state update
|
|
1557
1563
|
this.userLogout(true, true);
|
|
1558
1564
|
// Go to login page
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -2126,17 +2126,23 @@ export abstract class CoreApp<
|
|
|
2126
2126
|
* @param apiUrl Signout API URL
|
|
2127
2127
|
*/
|
|
2128
2128
|
async signout() {
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2129
|
+
const token = this.getCacheToken();
|
|
2130
|
+
if (token) {
|
|
2131
|
+
await this.api.put<boolean>(
|
|
2132
|
+
'Auth/Signout',
|
|
2133
|
+
{
|
|
2134
|
+
deviceId: this.deviceId,
|
|
2135
|
+
token: this.encrypt(token)
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
onError: (error) => {
|
|
2139
|
+
console.error('CoreApp.signout error', error);
|
|
2140
|
+
// Prevent further processing
|
|
2141
|
+
return false;
|
|
2142
|
+
}
|
|
2137
2143
|
}
|
|
2138
|
-
|
|
2139
|
-
|
|
2144
|
+
);
|
|
2145
|
+
}
|
|
2140
2146
|
|
|
2141
2147
|
// Clear, noTrigger = true, avoid state update
|
|
2142
2148
|
this.userLogout(true, true);
|