Skip to content

Commit 96d18f0

Browse files
committed
fix: do not send cookies
1 parent 26d9c93 commit 96d18f0

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

apps/api/src/lib/auth.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export function createAuth(env: Bindings, db: Db, resend: Resend) {
9191
},
9292
user: {
9393
additionalFields: {
94+
activeOrganizationId: {
95+
type: "string",
96+
required: false,
97+
input: false,
98+
},
9499
timezone: {
95100
type: "string",
96101
required: true,

apps/web-app/src/rpc/auth.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ export function loginEmailMutationOptions() {
4343
return mutationOptions({
4444
mutationKey: ["loginEmail"],
4545
mutationFn: async (input: Parameters<typeof authClient.signIn.email>[0]) => {
46-
const headers = new Headers();
47-
headers.set("cookie", (getIncomingHeaders() as any)["cookie"] ?? "");
48-
const { data, error } = await authClient.signIn.email(input, { headers });
46+
const { data, error } = await authClient.signIn.email(input);
4947
if (error) {
5048
throw new Error(error.message);
5149
}
@@ -58,9 +56,7 @@ export function signUpEmailMutationOptions() {
5856
return mutationOptions({
5957
mutationKey: ["signUpEmail"],
6058
mutationFn: async (input: Parameters<typeof authClient.signUp.email>[0]) => {
61-
const headers = new Headers();
62-
headers.set("cookie", (getIncomingHeaders() as any)["cookie"] ?? "");
63-
const { data, error } = await authClient.signUp.email(input, { headers });
59+
const { data, error } = await authClient.signUp.email(input);
6460
if (error) {
6561
throw new Error(error.message);
6662
}

0 commit comments

Comments
 (0)