-
-
Notifications
You must be signed in to change notification settings - Fork 350
chore: add better-auth module #1393
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: better-auth | ||
| description: >- | ||
| Nuxt module for Better Auth integration with NuxtHub, route protection, | ||
| session management, and role-based access | ||
| repo: nuxt-modules/better-auth | ||
| npm: '@nuxtjs/better-auth' | ||
| icon: better-auth.svg | ||
| github: https://github.com/nuxt-modules/better-auth | ||
| website: https://better-auth.nuxt.dev | ||
| learn_more: https://better-auth.com/ | ||
| category: Security | ||
| type: community | ||
| maintainers: | ||
| - name: Max | ||
| github: onmax | ||
| twitter: _onmax | ||
| bluesky: onmax.bsky.social | ||
| compatibility: | ||
| nuxt: '>=4.0.0' | ||
| requires: {} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: nuxt/modules
Length of output: 150
🏁 Script executed:
Repository: nuxt/modules
Length of output: 1457
🌐 Web query:
"nuxt-modules/better-auth" npm "@onmax/nuxt-better-auth" "@nuxtjs/better-auth"💡 Result:
The package
@onmax/nuxt-better-authis a community-developed Nuxt module designed to integrate Better Auth into Nuxt applications [1][2]. While it is hosted under thenuxt-modulesorganization on GitHub, it is currently in alpha status [1][3]. There are discussions regarding transitioning this module to the official@nuxtjsorganization, which would involve a potential rename [3]. Key details regarding this module and its ecosystem: - Purpose: It provides features such as native route protection viarouteRules, SSR-safe session access, auto-imported helpers, and optional NuxtHub integration [1][2]. - Installation: You can add it to a Nuxt project usingnpx nuxi module add@onmax/nuxt-better-auth@alpha[1]. - Official Alternatives: For developers requiring a stable production integration, the official Better Auth documentation provides a manual integration guide [4]. This manual approach involves mounting the Better Auth handler to a Nitro route (e.g.,server/api/auth/[...all].ts) and using thebetter-auth/vueclient, which offers more stability and control than the currently alpha-stage community module [4][2]. In summary, while@onmax/nuxt-better-authoffers a high-level, feature-rich abstraction that simplifies setup [2], users should be aware of its alpha status and the possibility of future breaking changes or migrations if it is moved to the official@nuxtjsnamespace [1][3]. For production-critical applications, the manual integration method documented on the official Better Auth website is the recommended approach [4][2].Citations:
🌐 Web query:
site:npmjs.com/package "@nuxtjs/better-auth" OR site:npmjs.com/package "@onmax/nuxt-better-auth"💡 Result:
As of August 19, 2026, there is no official package named
@nuxtjs/better-auth[1][2]. The package@onmax/nuxt-better-authis a community-maintained Nuxt module designed to integrate Better Auth into Nuxt 4 applications [2]. It is important to note that the Better Auth ecosystem in Nuxt has seen the emergence of several community-driven modules and layers, each offering different feature sets, rather than a single unified official package from the Nuxt team [1][2][3][4][5][6]. Key details regarding these packages:@onmax/nuxt-better-authThis module focuses on Nuxt-native features such as route protection via definePageMeta, SSR-safe session management using useUserSession, and optional integration with NuxtHub [2]. It is intended for users who want an opinionated, "batteries-included" integration for Nuxt 4 [2]. Alternative Modules and Layers Because Better Auth is framework-agnostic, various developers have created their own solutions to bridge it with Nuxt [7]: - nuxt-better-auth-utils: Focuses on auto-wiring handlers, SSR session pre-fetching, and providing typed server/client utilities [1]. -@xenterprises/nuxt-x-auth-better: A Nuxt layer providing pre-built UI components, OAuth, and magic link flows [4]. -@friendlyinternet/crouton-auth: An extensive layer for multi-tenant SaaS applications that includes billing (Stripe) and organization/team management [5]. -@lenne.tech/nuxt-extensions: Includes Better Auth integration alongside other utilities, specifically supporting features like passkeys and WebAuthn [3]. When choosing a solution, developers are advised to check the documentation for their specific needs, as these packages prioritize different workflows (e.g., modular vs. layer-based architecture) and specific Better Auth plugins [1][2][3][4][5][6].Citations:
Set
npmto@onmax/nuxt-better-auth. The current@nuxtjs/better-authvalue does not identify the published module and can direct users to the wrong package.🤖 Prompt for AI Agents