[PR #209] [MERGED] feat(nuxt): support session ssr for nuxt #3161

Closed
opened 2026-03-13 10:42:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/209
Author: @Bekacru
Created: 10/17/2024
Status: Merged
Merged: 10/17/2024
Merged by: @Bekacru

Base: mainHead: nuxt-integration


📝 Commits (8)

📊 Changes

6 files changed (+71 additions, -19 deletions)

View changed files

📝 docs/content/docs/integrations/nuxt.mdx (+23 -5)
📝 examples/nuxt-example/lib/auth-client.ts (+2 -2)
📝 examples/nuxt-example/pages/dashboard.vue (+6 -7)
📝 examples/nuxt-example/pages/index.vue (+4 -3)
📝 package.json (+1 -1)
📝 packages/better-auth/src/client/vue.ts (+35 -1)

📄 Description

Add support for Nuxt SSR in useSession

It allows useFetch to be passed in for ssr. If useFetch isn't provided, it defaults to client-side behavior.

const { data: session, isPending, error} = await useSession(useFetch)

🔄 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/209 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 10/17/2024 **Status:** ✅ Merged **Merged:** 10/17/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `nuxt-integration` --- ### 📝 Commits (8) - [`a3de9a6`](https://github.com/better-auth/better-auth/commit/a3de9a68a5c1616c3113539e3c166a1ffd655d43) init - [`ce03702`](https://github.com/better-auth/better-auth/commit/ce037024d381f74ce2df4aa63f767f29aeca4449) feat: support session ssr - [`a115d5c`](https://github.com/better-auth/better-auth/commit/a115d5c2ea1935508863202fbb9e42c2d864d15f) chore: remove unused export - [`3a19a36`](https://github.com/better-auth/better-auth/commit/3a19a36f4ffbc68016d6d90e47792e9fa14789aa) chore: release v0.4.12-beta.6 - [`b8e4884`](https://github.com/better-auth/better-auth/commit/b8e48840801f545fecf6c4805fbc387df3924547) fix: isPending isn't returned - [`d9e2523`](https://github.com/better-auth/better-auth/commit/d9e25231f276644135563a0e9a1ef37fd187cbae) fix: isPending should always be false - [`552e910`](https://github.com/better-auth/better-auth/commit/552e9100c75aa78394431e4698e0e0f320fabb92) Merge branch 'main' into nuxt-integration - [`d4ea4c1`](https://github.com/better-auth/better-auth/commit/d4ea4c195be5cf538f9b0910b0e24749c6cef9ca) docs ### 📊 Changes **6 files changed** (+71 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/integrations/nuxt.mdx` (+23 -5) 📝 `examples/nuxt-example/lib/auth-client.ts` (+2 -2) 📝 `examples/nuxt-example/pages/dashboard.vue` (+6 -7) 📝 `examples/nuxt-example/pages/index.vue` (+4 -3) 📝 `package.json` (+1 -1) 📝 `packages/better-auth/src/client/vue.ts` (+35 -1) </details> ### 📄 Description Add support for Nuxt SSR in `useSession` It allows `useFetch` to be passed in for ssr. If `useFetch` isn't provided, it defaults to client-side behavior. ```vue const { data: session, isPending, error} = await useSession(useFetch) ``` --- <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 10:42:01 -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#3161