Skip to content

Commit 57438bd

Browse files
committed
Allow cookies on OAuth API requests
1 parent 379a1bf commit 57438bd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lib/api/next/base.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ export async function GetJson<T>(
1616
transformer: (data: unknown) => T
1717
): Promise<T> {
1818
const res = await fetch(BaseUrl + path, {
19-
headers: { accept: 'application/json' },
2019
method: 'GET',
20+
headers: { accept: 'application/json' },
21+
credentials: 'include',
2122
redirect: 'error',
2223
});
2324

@@ -50,6 +51,7 @@ export async function PostJson<T>(
5051
accept: 'application/json',
5152
},
5253
body: JSON.stringify(body),
54+
credentials: 'include',
5355
redirect: 'error',
5456
});
5557

0 commit comments

Comments
 (0)