tin-spa 20.6.8 → 20.6.9

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.
@@ -1893,7 +1893,7 @@ class AuthService {
1893
1893
  resolve(true);
1894
1894
  }
1895
1895
  else {
1896
- // Changed: Only clear token if it still matches another tab may have already rotated it
1896
+ // Changed: Server explicitly rejected the token (revoked/expired)safe to clear
1897
1897
  const currentToken = this.storage.getPersistent(Constants.AUTH_REFRESH_TOKEN);
1898
1898
  if (currentToken === refreshToken) {
1899
1899
  this.storage.removePersistent(Constants.AUTH_REFRESH_TOKEN);
@@ -1905,13 +1905,8 @@ class AuthService {
1905
1905
  },
1906
1906
  error: () => {
1907
1907
  this.isRefreshing = false;
1908
- // Changed: Only clear token if it still matchesanother tab may have already rotated it
1909
- const currentToken = this.storage.getPersistent(Constants.AUTH_REFRESH_TOKEN);
1910
- if (currentToken === refreshToken) {
1911
- this.storage.removePersistent(Constants.AUTH_REFRESH_TOKEN);
1912
- this.storage.removePersistent(Constants.AUTH_REFRESH_TOKEN_EXPIRE);
1913
- this.storage.removePersistent(Constants.AUTH_REMEMBER_ME);
1914
- }
1908
+ // Changed: Network error (device waking up, no connectivity)do NOT clear the refresh token.
1909
+ // The token may still be valid; next visibility change or 401 interceptor will retry.
1915
1910
  resolve(false);
1916
1911
  }
1917
1912
  });