better-auth-nuxt 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -6
- package/dist/module.json +1 -1
- package/package.json +34 -36
package/README.md
CHANGED
|
@@ -26,13 +26,13 @@ A Nuxt module for simple, flexible authentication in your Nuxt applications.
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# Using npm
|
|
29
|
-
npm install better-auth-nuxt
|
|
29
|
+
npm install better-auth-nuxt better-auth
|
|
30
30
|
|
|
31
31
|
# Using yarn
|
|
32
|
-
yarn add better-auth-nuxt
|
|
32
|
+
yarn add better-auth-nuxt better-auth
|
|
33
33
|
|
|
34
34
|
# Using pnpm
|
|
35
|
-
pnpm add better-auth-nuxt
|
|
35
|
+
pnpm add better-auth-nuxt better-auth
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
2. Add the module to your `nuxt.config.ts`:
|
|
@@ -209,10 +209,12 @@ You can create configuration files to customize authentication:
|
|
|
209
209
|
Create a `*.better-auth.ts` file to configure server-side auth:
|
|
210
210
|
|
|
211
211
|
```ts
|
|
212
|
-
//
|
|
212
|
+
// server/my-auth.better-auth.ts
|
|
213
|
+
import type { BetterAuthOptions } from 'better-auth'
|
|
214
|
+
|
|
213
215
|
export default {
|
|
214
216
|
// Custom server-side auth configuration
|
|
215
|
-
}
|
|
217
|
+
} satisfies BetterAuthOptions
|
|
216
218
|
```
|
|
217
219
|
|
|
218
220
|
### Client Configuration
|
|
@@ -221,11 +223,15 @@ Create a `*.better-auth-client.ts` file to configure client-side auth:
|
|
|
221
223
|
|
|
222
224
|
```ts
|
|
223
225
|
// app/my-auth.better-auth-client.ts
|
|
226
|
+
import type { ClientOptions } from 'better-auth'
|
|
227
|
+
|
|
224
228
|
export default {
|
|
225
229
|
// Custom client-side auth configuration
|
|
226
|
-
}
|
|
230
|
+
} satisfies ClientOptions
|
|
227
231
|
```
|
|
228
232
|
|
|
233
|
+
> **Note**: After adding or modifying configuration files, run `pnpm nuxt prepare` to ensure your changes are properly recognized by Nuxt.
|
|
234
|
+
|
|
229
235
|
## Contribution
|
|
230
236
|
|
|
231
237
|
<details>
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-auth-nuxt",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Better Auth Nuxt Module",
|
|
5
5
|
"repository": "productdevbook/better-auth-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,47 +22,45 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"better-auth": ">=1.2.7"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@fastify/deepmerge": "^3.1.0",
|
|
30
|
+
"@nuxt/kit": "^3.17.0",
|
|
31
|
+
"defu": "^6.1.4",
|
|
32
|
+
"ohash": "^2.0.11",
|
|
33
|
+
"pathe": "^2.0.3",
|
|
34
|
+
"scule": "^1.3.0",
|
|
35
|
+
"tinyglobby": "^0.2.13"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@nuxt/devtools": "^2.4.0",
|
|
39
|
+
"@nuxt/eslint-config": "^1.3.0",
|
|
40
|
+
"@nuxt/module-builder": "^1.0.1",
|
|
41
|
+
"@nuxt/schema": "^3.17.0",
|
|
42
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
43
|
+
"@tailwindcss/vite": "^4.1.4",
|
|
44
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
45
|
+
"@types/node": "latest",
|
|
46
|
+
"better-auth": "^1.2.7",
|
|
47
|
+
"better-sqlite3": "^11.9.1",
|
|
48
|
+
"changelogen": "^0.6.1",
|
|
49
|
+
"eslint": "^9.25.1",
|
|
50
|
+
"nuxt": "^3.17.0",
|
|
51
|
+
"typescript": "~5.8.3",
|
|
52
|
+
"vitest": "^3.1.2",
|
|
53
|
+
"vue-tsc": "^2.2.10"
|
|
54
|
+
},
|
|
25
55
|
"scripts": {
|
|
26
|
-
"prepack": "nuxt-module-build build",
|
|
27
56
|
"dev": "nuxi dev playground",
|
|
28
57
|
"dev:build": "nuxi build playground",
|
|
29
58
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
30
|
-
"release": "npm run lint && npm run test && npm run prepack && changelogen --release &&
|
|
59
|
+
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && pnpm publish --no-git-checks --access public && git push --follow-tags",
|
|
31
60
|
"lint": "eslint .",
|
|
32
61
|
"lint:fix": "eslint . --fix",
|
|
33
62
|
"test": "vitest run",
|
|
34
63
|
"test:watch": "vitest watch",
|
|
35
64
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
"better-auth": ">=1.2.7"
|
|
39
|
-
},
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"@fastify/deepmerge": "catalog:",
|
|
42
|
-
"@nuxt/kit": "catalog:",
|
|
43
|
-
"defu": "catalog:",
|
|
44
|
-
"ohash": "catalog:",
|
|
45
|
-
"pathe": "catalog:",
|
|
46
|
-
"scule": "catalog:",
|
|
47
|
-
"tinyglobby": "catalog:"
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@nuxt/devtools": "catalog:",
|
|
51
|
-
"@nuxt/eslint-config": "catalog:",
|
|
52
|
-
"@nuxt/module-builder": "catalog:",
|
|
53
|
-
"@nuxt/schema": "catalog:",
|
|
54
|
-
"@nuxt/test-utils": "catalog:",
|
|
55
|
-
"@tailwindcss/vite": "catalog:",
|
|
56
|
-
"@types/better-sqlite3": "catalog:",
|
|
57
|
-
"@types/node": "latest",
|
|
58
|
-
"better-auth": "catalog:",
|
|
59
|
-
"better-sqlite3": "catalog:",
|
|
60
|
-
"changelogen": "catalog:",
|
|
61
|
-
"eslint": "catalog:",
|
|
62
|
-
"nuxt": "catalog:",
|
|
63
|
-
"typescript": "catalog:",
|
|
64
|
-
"vitest": "catalog:",
|
|
65
|
-
"vue-tsc": "catalog:"
|
|
66
|
-
},
|
|
67
|
-
"packageManager": "pnpm@10.10.0"
|
|
68
|
-
}
|
|
65
|
+
}
|
|
66
|
+
}
|