[PR #1742] [MERGED] chore(example): fix bugs in SvelteKit example #3970

Closed
opened 2026-03-13 11:25:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1742
Author: @phanect
Created: 3/9/2025
Status: Merged
Merged: 7/25/2025
Merged by: @Bekacru

Base: mainHead: chore-example-sveltekit


📝 Commits (10+)

  • 7ab61c3 refactor: upgrade Svelte, Vite and related packages
  • 663cbe4 refactor: replace no longer supported body.callbackURL with onSuccess
  • 550f350 fix: add missing svelte-kit sync on prepare
  • 2de011c fix: add missing imports
  • 3962f33 chore(svelte-kit-example): show message & redirect to index after sign up
  • 6f46783 chore: add npm script to migrate database
  • 73be34b doc: add more commands to set up
  • 334f8b6 chore: explicitly disable verification email on sign up
  • cc25303 refactor(svelte-kit-example): add type for hooks
  • d5091f1 chore(svelte-kit-example): redirect to sign in page if users open dashboard without log in

📊 Changes

73 files changed (+628 additions, -472 deletions)

View changed files

📝 biome.json (+12 -0)
📝 examples/svelte-kit-example/.gitignore (+5 -0)
📝 examples/svelte-kit-example/README.md (+4 -0)
📝 examples/svelte-kit-example/package.json (+9 -6)
📝 examples/svelte-kit-example/src/app.d.ts (+4 -1)
📝 examples/svelte-kit-example/src/hooks.server.ts (+19 -3)
📝 examples/svelte-kit-example/src/lib/auth.ts (+6 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte (+6 -4)
📝 examples/svelte-kit-example/src/lib/components/ui/avatar/avatar-fallback.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/avatar/avatar-image.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/avatar/avatar.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/button/button.svelte (+3 -1)
📝 examples/svelte-kit-example/src/lib/components/ui/calendar/calendar-next-button.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/calendar/calendar-prev-button.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/calendar/calendar.svelte (+35 -22)
📝 examples/svelte-kit-example/src/lib/components/ui/card/card-content.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/card/card-description.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/card/card-footer.svelte (+1 -0)
📝 examples/svelte-kit-example/src/lib/components/ui/card/card-header.svelte (+1 -0)

...and 53 more files

📄 Description

This PR fixes bugs in the SvelteKit example, which is not working properly at all now.
I also upgraded Svelte and related packages in this PR.

I have not fixed all the TypeScript errors yet, but they probably do not affect the behavior as far as I checked. If I have a chance, I will fix those errors or clean up unused code later.


🔄 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/better-auth/better-auth/pull/1742 **Author:** [@phanect](https://github.com/phanect) **Created:** 3/9/2025 **Status:** ✅ Merged **Merged:** 7/25/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `chore-example-sveltekit` --- ### 📝 Commits (10+) - [`7ab61c3`](https://github.com/better-auth/better-auth/commit/7ab61c3a748187f08ef39aa6fdeb15c66dccac62) refactor: upgrade Svelte, Vite and related packages - [`663cbe4`](https://github.com/better-auth/better-auth/commit/663cbe4de733780df039987c460f8af7c01b1e57) refactor: replace no longer supported `body.callbackURL` with `onSuccess` - [`550f350`](https://github.com/better-auth/better-auth/commit/550f3500c6acf924b8e18812d17c0551439d711b) fix: add missing `svelte-kit sync` on `prepare` - [`2de011c`](https://github.com/better-auth/better-auth/commit/2de011c4f15b3d4e5dc5a2eb9cbefebbd225d5b9) fix: add missing `import`s - [`3962f33`](https://github.com/better-auth/better-auth/commit/3962f339b7dfd7aa77751c5ef6fa23c7cb8db7c1) chore(svelte-kit-example): show message & redirect to index after sign up - [`6f46783`](https://github.com/better-auth/better-auth/commit/6f46783a3249c8d90055db596898b5d6ccb02fc7) chore: add npm script to migrate database - [`73be34b`](https://github.com/better-auth/better-auth/commit/73be34bb2389db1f0b253966e166ec359a8fc0d0) doc: add more commands to set up - [`334f8b6`](https://github.com/better-auth/better-auth/commit/334f8b65ec2a2874af6f035a0c0e0d61660e93b9) chore: explicitly disable verification email on sign up - [`cc25303`](https://github.com/better-auth/better-auth/commit/cc25303873fa6e70fb4641500e01b3ee511c0010) refactor(svelte-kit-example): add type for hooks - [`d5091f1`](https://github.com/better-auth/better-auth/commit/d5091f12304b7c9c59190fe752a4633622700b06) chore(svelte-kit-example): redirect to sign in page if users open dashboard without log in ### 📊 Changes **73 files changed** (+628 additions, -472 deletions) <details> <summary>View changed files</summary> 📝 `biome.json` (+12 -0) 📝 `examples/svelte-kit-example/.gitignore` (+5 -0) 📝 `examples/svelte-kit-example/README.md` (+4 -0) 📝 `examples/svelte-kit-example/package.json` (+9 -6) 📝 `examples/svelte-kit-example/src/app.d.ts` (+4 -1) 📝 `examples/svelte-kit-example/src/hooks.server.ts` (+19 -3) 📝 `examples/svelte-kit-example/src/lib/auth.ts` (+6 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte` (+6 -4) 📝 `examples/svelte-kit-example/src/lib/components/ui/avatar/avatar-fallback.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/avatar/avatar-image.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/avatar/avatar.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/button/button.svelte` (+3 -1) 📝 `examples/svelte-kit-example/src/lib/components/ui/calendar/calendar-next-button.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/calendar/calendar-prev-button.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/calendar/calendar.svelte` (+35 -22) 📝 `examples/svelte-kit-example/src/lib/components/ui/card/card-content.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/card/card-description.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/card/card-footer.svelte` (+1 -0) 📝 `examples/svelte-kit-example/src/lib/components/ui/card/card-header.svelte` (+1 -0) _...and 53 more files_ </details> ### 📄 Description This PR fixes bugs in the SvelteKit example, which is not working properly at all now. I also upgraded Svelte and related packages in this PR. I have not fixed all the TypeScript errors yet, but they probably do not affect the behavior as far as I checked. If I have a chance, I will fix those errors or clean up unused code later. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:25:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#3970