Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to better auth #1951

Merged
merged 12 commits into from
Dec 3, 2024
Prev Previous commit
Next Next commit
feat: remove types/authjs
  • Loading branch information
DIYgod committed Dec 2, 2024
commit f7ad5ff6ee545ec6eb64fe2aba9a8421ced28ddd
1 change: 0 additions & 1 deletion apps/main/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "../../types/vite"
import "../../types/authjs"

declare global {
const GIT_COMMIT_HASH: string
Expand Down
9 changes: 0 additions & 9 deletions apps/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,6 @@ function bootstrap() {
domain: new URL(apiURL).hostname,
sameSite: "no_restriction",
})
mainWindow.webContents.session.cookies.set({
url: apiURL,
name: "authjs.callback-url",
value: env.VITE_WEB_URL,
secure: true,
httpOnly: true,
domain: new URL(apiURL).hostname,
sameSite: "no_restriction",
})
userId && (await callWindowExpose(mainWindow).clearIfLoginOtherAccount(userId))
mainWindow.reload()

Expand Down
2 changes: 0 additions & 2 deletions apps/renderer/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "../../types/authjs"

import type { ElectronAPI } from "@electron-toolkit/preload"

declare global {
Expand Down