[PR #2057] feat: Migrate from next-auth to better-auth #1962

Open
opened 2026-03-02 11:59:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/2057
Author: @MohamedBassem
Created: 10/19/2025
Status: 🔄 Open

Base: mainHead: better-auth-2


📝 Commits (10+)

📊 Changes

37 files changed (+8749 additions, -947 deletions)

View changed files

📝 apps/web/app/api/auth/[...nextauth]/route.tsx (+3 -2)
apps/web/app/api/auth/callback/custom/route.tsx (+19 -0)
📝 apps/web/app/logout/page.tsx (+19 -8)
apps/web/auth-schema.ts (+82 -0)
📝 apps/web/components/admin/UserList.tsx (+2 -2)
📝 apps/web/components/dashboard/header/ProfileOptions.tsx (+7 -3)
📝 apps/web/components/invite/InviteAcceptForm.tsx (+11 -5)
📝 apps/web/components/signin/CredentialsForm.tsx (+7 -9)
📝 apps/web/components/signin/ForgotPasswordForm.tsx (+9 -10)
📝 apps/web/components/signin/ResetPasswordForm.tsx (+12 -12)
📝 apps/web/components/signin/SignInForm.tsx (+12 -10)
📝 apps/web/components/signin/SignInProviderButton.tsx (+14 -6)
📝 apps/web/components/signup/SignUpForm.tsx (+7 -8)
apps/web/lib/auth-client.ts (+20 -0)
📝 apps/web/lib/providers.tsx (+5 -5)
📝 apps/web/package.json (+1 -2)
📝 apps/web/server/api/client.ts (+12 -1)
📝 apps/web/server/auth.ts (+142 -191)
packages/db/drizzle/0064_better_auth_migration.sql (+79 -0)
packages/db/drizzle/0065_add_id_to_verification_table.sql (+9 -0)

...and 17 more files

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/2057 **Author:** [@MohamedBassem](https://github.com/MohamedBassem) **Created:** 10/19/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `better-auth-2` --- ### 📝 Commits (10+) - [`e327b49`](https://github.com/karakeep-app/karakeep/commit/e327b49a40ceafe68260aa9634864db33353f7fd) feat: Migrate from next-auth to better-auth - [`8635d56`](https://github.com/karakeep-app/karakeep/commit/8635d56cb843a15d25da0da8827b13d1844b1a17) fix infinite redirect - [`3d96b1d`](https://github.com/karakeep-app/karakeep/commit/3d96b1d90300b87ac019f1bba63e54400ab94fe1) upgrade better-auth - [`de3bb89`](https://github.com/karakeep-app/karakeep/commit/de3bb89a853173ae56c343ec27dad15373571100) drop pass sync - [`a1f06cb`](https://github.com/karakeep-app/karakeep/commit/a1f06cb3e63d0af7a4eec146dea9c9649b9c65ee) schema changes - [`1fb219b`](https://github.com/karakeep-app/karakeep/commit/1fb219b1434da8514cbdf181d05f200e4e58c0ff) drop manual password reset management - [`d815147`](https://github.com/karakeep-app/karakeep/commit/d815147c55bae954143d53136357b933b4406c69) deprecate salts - [`afac4d0`](https://github.com/karakeep-app/karakeep/commit/afac4d05e721864361cfc52125b4c26944dedb33) updatedAt -> modifiedAt - [`8554a66`](https://github.com/karakeep-app/karakeep/commit/8554a662fc6f4ae7af7fcc6003f89fed67836af5) drop schema changes - [`6bb9346`](https://github.com/karakeep-app/karakeep/commit/6bb934616fe1713da55fc30737a777e858f0486a) schema changes ### 📊 Changes **37 files changed** (+8749 additions, -947 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/app/api/auth/[...nextauth]/route.tsx` (+3 -2) ➕ `apps/web/app/api/auth/callback/custom/route.tsx` (+19 -0) 📝 `apps/web/app/logout/page.tsx` (+19 -8) ➕ `apps/web/auth-schema.ts` (+82 -0) 📝 `apps/web/components/admin/UserList.tsx` (+2 -2) 📝 `apps/web/components/dashboard/header/ProfileOptions.tsx` (+7 -3) 📝 `apps/web/components/invite/InviteAcceptForm.tsx` (+11 -5) 📝 `apps/web/components/signin/CredentialsForm.tsx` (+7 -9) 📝 `apps/web/components/signin/ForgotPasswordForm.tsx` (+9 -10) 📝 `apps/web/components/signin/ResetPasswordForm.tsx` (+12 -12) 📝 `apps/web/components/signin/SignInForm.tsx` (+12 -10) 📝 `apps/web/components/signin/SignInProviderButton.tsx` (+14 -6) 📝 `apps/web/components/signup/SignUpForm.tsx` (+7 -8) ➕ `apps/web/lib/auth-client.ts` (+20 -0) 📝 `apps/web/lib/providers.tsx` (+5 -5) 📝 `apps/web/package.json` (+1 -2) 📝 `apps/web/server/api/client.ts` (+12 -1) 📝 `apps/web/server/auth.ts` (+142 -191) ➕ `packages/db/drizzle/0064_better_auth_migration.sql` (+79 -0) ➕ `packages/db/drizzle/0065_add_id_to_verification_table.sql` (+9 -0) _...and 17 more files_ </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1962
No description provided.