+5
-16
server/services/feed-generator-client.ts
+5
-16
server/services/feed-generator-client.ts
···
57
57
Accept: 'application/json',
58
58
};
59
59
60
-
// Forward viewer Authorization to feed generator when present, aligning with upstream behavior
60
+
// Forward viewer Authorization to feed generator when present
61
+
// This is OPTIONAL per AT Protocol spec - feed generators work without auth
61
62
if (options?.viewerAuthorization) {
62
63
headers['Authorization'] = options.viewerAuthorization;
63
64
console.log(
64
65
`[FeedGenClient] Forwarded viewer Authorization header to feedgen`
65
66
);
66
-
} else if (params.feedGeneratorDid) {
67
-
try {
68
-
const serviceToken = appViewJWTService.signFeedGeneratorToken(
69
-
params.feedGeneratorDid
70
-
);
71
-
headers['Authorization'] = `Bearer ${serviceToken}`;
72
-
console.log(
73
-
`[FeedGenClient] Attached AppView service Authorization for ${params.feedGeneratorDid}`
74
-
);
75
-
} catch (err) {
76
-
console.warn(
77
-
`[FeedGenClient] Failed to attach AppView service token:`,
78
-
err
79
-
);
80
-
}
81
67
}
68
+
// NOTE: We intentionally do NOT send AppView service auth tokens
69
+
// because feed generators are public endpoints and most don't expect/validate them
70
+
// This prevents the "DID syntax didn't validate" error from feed generators
82
71
83
72
const response = await fetch(url.toString(), {
84
73
method: 'GET',