@kanjijs/auth 0.2.0-beta.16 → 0.2.0-beta.18

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 +18 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -32,6 +32,23 @@ import GitHub from "@auth/core/providers/github";
32
32
  ]
33
33
  })
34
34
  export class AppModule {}
35
+ ]
36
+ })
37
+ export class AppModule {}
38
+ ```
39
+
40
+ ### 4. Database Adapter (Optional)
41
+
42
+ You can persist sessions in your database using `@auth/drizzle-adapter`.
43
+
44
+ ```typescript
45
+ import { DrizzleAdapter } from "@auth/drizzle-adapter";
46
+ import { db } from "./db";
47
+
48
+ AuthModule.forRoot({
49
+ adapter: DrizzleAdapter(db),
50
+ // ... other config
51
+ })
35
52
  ```
36
53
 
37
54
  ### 2. Protecting Routes
@@ -69,5 +86,5 @@ adminPanel(c: Context) {
69
86
 
70
87
  ## 🛠️ Configuration
71
88
 
72
- The `config` object passed to `AuthModule.forRoot(config)` is strict `AuthConfig` from `@auth/core`.
89
+ The `config` object passed to `AuthModule.forRoot(config)` is strict `AuthConfig` from `@auth/core`.
73
90
  Refer to [Auth.js Documentation](https://authjs.dev/reference/core#authconfig) for all available options (callbacks, pages, session strategy, etc.).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanjijs/auth",
3
- "version": "0.2.0-beta.16",
3
+ "version": "0.2.0-beta.18",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -18,7 +18,7 @@
18
18
  "hono": "^4.0.0"
19
19
  },
20
20
  "peerDependencies": {
21
- "@kanjijs/core": "^0.2.0-beta.16"
21
+ "@kanjijs/core": "^0.2.0-beta.18"
22
22
  },
23
23
  "devDependencies": {
24
24
  "typescript": "^5.0.0",