diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index 692ce9d39..e7d471a11 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -48,7 +48,7 @@ If you prefer to develop in Electron, follow these steps: pnpm run dev ``` -> **Tip:** If you encounter login issues, copy the `better-auth.session_token` from your browser's cookies into the app. +> **Tip:** If you encounter login issues, copy the `__Secure-better-auth.session_token` from your browser's cookies into the app. ## Contribution Guidelines diff --git a/README.md b/README.md index d40dd254d..3f8996328 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ pnpm run dev Since it is not very convenient to develop in Electron, the first way to develop and contribute is recommended at this stage. > [!TIP] -> If you can't log in to the app, copy the `better-auth.session_token` in the cookie from your browser into the app. +> If you can't log in to the app, copy the `__Secure-better-auth.session_token` in the cookie from your browser into the app. ## 📝 License diff --git a/apps/server/src/lib/api-client.ts b/apps/server/src/lib/api-client.ts index c71b2d75c..3cf0a937d 100644 --- a/apps/server/src/lib/api-client.ts +++ b/apps/server/src/lib/api-client.ts @@ -59,7 +59,7 @@ export const createApiClient = () => { "X-App-Version": PKG.version, "X-App-Dev": isDev ? "1" : "0", "User-Agent": `Follow External Server Api Client/${PKG.version}`, - Cookie: authSessionToken ? `better-auth.session_token=${authSessionToken}` : "", + Cookie: authSessionToken ? `__Secure-better-auth.session_token=${authSessionToken}` : "", } }, }) @@ -78,7 +78,7 @@ export const getTokenFromCookie = (cookie: string) => { }, {} as Record, ) - return parsedCookieMap["better-auth.session_token"] + return parsedCookieMap["__Secure-better-auth.session_token"] } export type ApiClient = ReturnType