@dunx/auth 3.1.3 → 3.2.0

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.
Files changed (2) hide show
  1. package/README.md +12 -10
  2. 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
- **This package is not an authentication system.** better-auth is, and it is very
7
- good at it. This is the wiring: a module that builds the instance from your
8
- `ConfigService`, five routes that mount its handler, a guard that composes with
9
- the `@Public()` and `@Roles()` metadata `@dunx/http` already carries, and two
10
- adapters that let it drive Bun's own APIs.
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. They are better-auth's, they
72
- change with its plugins, and `bunx @better-auth/cli generate` writes them.
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 and `mountAt`
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`, because everything in that store is serialized into every
79
- log line the request writes.
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",
3
+ "version": "3.2.0",
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": "^1.6.25",
58
- "drizzle-orm": "^0.45.2"
57
+ "better-auth": "1.6.25",
58
+ "drizzle-orm": "0.45.2"
59
59
  },
60
60
  "peerDependencies": {
61
- "@dunx/core": "^3.1.3",
62
- "@dunx/http": "^3.1.3",
61
+ "@dunx/core": "^3.2.0",
62
+ "@dunx/http": "^3.2.0",
63
63
  "@types/bun": ">=1.3.0",
64
64
  "better-auth": "^1.6.25",
65
65
  "drizzle-orm": "^0.45.2"