@digital-ai/dot-illustrations 2.0.35 → 2.0.36

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.
@@ -17,17 +17,14 @@ const GITHUB_UPLOAD_CONFIG = {
17
17
  SCOPES: 'public_repo',
18
18
  };
19
19
 
20
- const STORAGE_TOKEN_KEY = 'gh_illus_token';
21
- const STORAGE_USER_KEY = 'gh_illus_user';
20
+ // ─── In-memory token (never persisted — cleared when page closes) ────────────
22
21
 
23
- // ─── Token helpers ──────────────────────────────────────────────────────────
22
+ let _ghToken = null;
23
+ let _ghUser = null;
24
24
 
25
- function ghGetToken() { return localStorage.getItem(STORAGE_TOKEN_KEY); }
26
- function ghSetToken(t) { localStorage.setItem(STORAGE_TOKEN_KEY, t); }
27
- function ghClearToken() {
28
- localStorage.removeItem(STORAGE_TOKEN_KEY);
29
- localStorage.removeItem(STORAGE_USER_KEY);
30
- }
25
+ function ghGetToken() { return _ghToken; }
26
+ function ghSetToken(t) { _ghToken = t; }
27
+ function ghClearToken() { _ghToken = null; _ghUser = null; }
31
28
 
32
29
  // ─── GitHub API helpers ──────────────────────────────────────────────────────
33
30
 
package/demo/script.js CHANGED
@@ -516,7 +516,6 @@ document.addEventListener('DOMContentLoaded', () => {
516
516
  badge.classList.remove('hidden');
517
517
  badge.style.display = 'flex';
518
518
  name.textContent = `@${user.login}`;
519
- localStorage.setItem('gh_illus_user', JSON.stringify(user));
520
519
  } else {
521
520
  btn.classList.remove('hidden');
522
521
  badge.style.display = 'none';
@@ -591,11 +590,7 @@ document.addEventListener('DOMContentLoaded', () => {
591
590
  }
592
591
  });
593
592
 
594
- // Restore session
595
- const savedUser = localStorage.getItem('gh_illus_user');
596
- if (window.GitHubUpload?.getToken?.() && savedUser) {
597
- try { updateAuthBadge(JSON.parse(savedUser)); } catch {}
598
- }
593
+ // No session restore — token is in-memory only for security
599
594
 
600
595
  // ── Upload panel ─────────────────────────────────────────────────────────
601
596
  const uploadBufs = { illusLight: null, illusDark: null, integSvg: null };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-illustrations",
3
- "version": "2.0.35",
3
+ "version": "2.0.36",
4
4
  "description": "A central place for the design team to keep illustrations and for dev teams to find them.",
5
5
  "main": "./index.css",
6
6
  "scripts": {