Skip to content

Commit

Permalink
Use token parameter instead of authorization header
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Nov 15, 2024
1 parent 8df6331 commit 43fe5e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/linearlite/src/pages/Issue/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function Comments(commentProps: CommentsProps) {
url: `${baseUrl}/v1/shape`,
table: `comment`,
databaseId,
headers: {
Authorization: `Bearer ${token}`,
params: {
token,
},
})! as Comment[]

Expand Down
4 changes: 2 additions & 2 deletions examples/linearlite/src/shapes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const issueShape: ShapeStreamOptions = {
url: `${baseUrl}/v1/shape/`,
table: `issue`,
databaseId,
headers: {
Authorization: `Bearer ${token}`,
params: {
token,
},
}
2 changes: 1 addition & 1 deletion examples/nextjs-example/app/shape-proxy/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(), {
Expand Down

0 comments on commit 43fe5e3

Please sign in to comment.