fix(rsocials): campaign wizard auth — read correct session storage key

Was reading `encryptid-token` (doesn't exist), now reads `encryptid_session`
and extracts `.accessToken` matching the pattern used by all other modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-25 16:01:10 -07:00
parent aa23108f5f
commit 4d7d2c0108
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ export class FolkCampaignWizard extends HTMLElement {
} }
private async apiFetch(path: string, opts: RequestInit = {}): Promise<Response> { private async apiFetch(path: string, opts: RequestInit = {}): Promise<Response> {
const token = (window as any).__authToken || localStorage.getItem('encryptid-token') || ''; let token = '';
try { const s = JSON.parse(localStorage.getItem('encryptid_session') || ''); token = s.accessToken || ''; } catch {}
return fetch(`${this.basePath}${path}`, { return fetch(`${this.basePath}${path}`, {
...opts, ...opts,
headers: { headers: {