From 43fe5e3fd1b4fbd53d40afb5c47906ba48fc5a19 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 15 Nov 2024 10:56:08 -0700 Subject: [PATCH] Use token parameter instead of authorization header --- examples/linearlite/src/pages/Issue/Comments.tsx | 4 ++-- examples/linearlite/src/shapes.ts | 4 ++-- examples/nextjs-example/app/shape-proxy/route.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/linearlite/src/pages/Issue/Comments.tsx b/examples/linearlite/src/pages/Issue/Comments.tsx index 02bcf425b7..26fa41d7a5 100644 --- a/examples/linearlite/src/pages/Issue/Comments.tsx +++ b/examples/linearlite/src/pages/Issue/Comments.tsx @@ -20,8 +20,8 @@ function Comments(commentProps: CommentsProps) { url: `${baseUrl}/v1/shape`, table: `comment`, databaseId, - headers: { - Authorization: `Bearer ${token}`, + params: { + token, }, })! as Comment[] diff --git a/examples/linearlite/src/shapes.ts b/examples/linearlite/src/shapes.ts index 1e513ddd13..4f23488bbb 100644 --- a/examples/linearlite/src/shapes.ts +++ b/examples/linearlite/src/shapes.ts @@ -5,7 +5,7 @@ export const issueShape: ShapeStreamOptions = { url: `${baseUrl}/v1/shape/`, table: `issue`, databaseId, - headers: { - Authorization: `Bearer ${token}`, + params: { + token, }, } diff --git a/examples/nextjs-example/app/shape-proxy/route.ts b/examples/nextjs-example/app/shape-proxy/route.ts index 9a940fffef..aadfae4d3a 100644 --- a/examples/nextjs-example/app/shape-proxy/route.ts +++ b/examples/nextjs-example/app/shape-proxy/route.ts @@ -16,7 +16,7 @@ export async function GET(request: Request) { const headers = new Headers() if (process.env.ELECTRIC_TOKEN) { - headers.set(`Authorization`, `Bearer ${process.env.ELECTRIC_TOKEN}`) + originUrl.searchParams.set(`token`, process.env.ELECTRIC_TOKEN) } const newRequest = new Request(originUrl.toString(), {