@dunx/auth 3.1.3 → 3.2.1
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 -10
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
[Better Auth](https://better-auth.com) for
|
|
4
4
|
[dunx](https://github.com/petarzarkov/dunx).
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
This package wires better-auth into dunx: a module that builds the instance
|
|
7
|
+
from your `ConfigService`, five routes that mount its handler, a guard that
|
|
8
|
+
composes with the `@Public()` and `@Roles()` metadata `@dunx/http` already
|
|
9
|
+
carries, and two adapters that let it drive Bun's own APIs.
|
|
10
|
+
|
|
11
|
+
better-auth handles authentication itself; this package does not reimplement
|
|
12
|
+
it.
|
|
11
13
|
|
|
12
14
|
There is no dunx sign-in flow, no dunx session table and no dunx OAuth. Each is
|
|
13
15
|
a better-auth feature reached through `AuthModule.forRoot`'s options, which
|
|
@@ -68,15 +70,15 @@ The [Authentication guide](../../docs/guide/17-authentication.md) is canonical.
|
|
|
68
70
|
|
|
69
71
|
## Notes
|
|
70
72
|
|
|
71
|
-
- dunx ships no schema for better-auth's tables
|
|
72
|
-
change with its plugins
|
|
73
|
+
- dunx ships no schema for better-auth's tables: they belong to better-auth
|
|
74
|
+
and change with its plugins. `bunx @better-auth/cli generate` writes them.
|
|
73
75
|
Export them under the singular model names the adapter looks up.
|
|
74
|
-
- Under `setGlobalPrefix`, `basePath` is what better-auth matches
|
|
76
|
+
- Under `setGlobalPrefix`, `basePath` is what better-auth matches. `mountAt`
|
|
75
77
|
is where the route is mounted. Omitting `mountAt` with a non-default
|
|
76
78
|
`basePath` is a boot error.
|
|
77
79
|
- `AuthContext` is a second `AsyncLocalStorage` store rather than a key in
|
|
78
|
-
`RequestContext
|
|
79
|
-
|
|
80
|
+
`RequestContext`. Everything in that store is serialized into every log
|
|
81
|
+
line the request writes.
|
|
80
82
|
|
|
81
83
|
## License
|
|
82
84
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dunx/auth",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Better Auth for dunx: its handler mounted on Bun.serve, a session guard reading @Public() and @Roles(), the caller in async context, and Bun.password hashing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"auth",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@dunx/core": "workspace:*",
|
|
56
56
|
"@dunx/http": "workspace:*",
|
|
57
|
-
"better-auth": "
|
|
58
|
-
"drizzle-orm": "
|
|
57
|
+
"better-auth": "1.6.25",
|
|
58
|
+
"drizzle-orm": "0.45.2"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@dunx/core": "^3.1
|
|
62
|
-
"@dunx/http": "^3.1
|
|
61
|
+
"@dunx/core": "^3.2.1",
|
|
62
|
+
"@dunx/http": "^3.2.1",
|
|
63
63
|
"@types/bun": ">=1.3.0",
|
|
64
64
|
"better-auth": "^1.6.25",
|
|
65
65
|
"drizzle-orm": "^0.45.2"
|