@strapi-community/plugin-better-auth-dashboard 1.0.0-alpha.1 → 1.0.0-alpha.10

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 ADDED
@@ -0,0 +1,101 @@
1
+ # Strapi + Better Auth Dashboard
2
+
3
+ An admin panel dashboard plugin for [Strapi](https://strapi.io) that provides user management, session monitoring, and analytics for [Better Auth](https://better-auth.com) authentication.
4
+
5
+ > [!CAUTION]
6
+ > This plugin is in BETA state. It is by no means considered stable and should not be used in production. If you want to contribute to its development, please contact any of the maintainers.
7
+
8
+ ## Features
9
+
10
+ - Overview page with user metrics, growth charts, and cohort retention analysis
11
+ - User management: search, create, edit, delete, and ban users
12
+ - Session management: view and revoke active sessions per user from the user detail drawer
13
+ - Organization management (when the Better Auth organization plugin is enabled)
14
+ - Real-time active user tracking (DAU / WAU / MAU)
15
+ - Automatic feature detection — ban, 2FA, email verification, and organization UI adapts to your Better Auth config
16
+
17
+ ## Installation
18
+
19
+ The additional dashboard plugin requires you to have the Better Auth plugin already installed and configured.
20
+
21
+ ### Packages
22
+
23
+ ```bash
24
+ npm install @better-auth/infra @strapi-community/plugin-better-auth-dashboard
25
+ # or
26
+ yarn add @better-auth/infra @strapi-community/plugin-better-auth-dashboard
27
+ # or
28
+ pnpm add @better-auth/infra @strapi-community/plugin-better-auth-dashboard
29
+ ```
30
+
31
+ ### Configuration
32
+
33
+ > [!CAUTION]
34
+ > This plugin only works if you have not changed the `basePath` of Better Auth. It needs to be the default `/api/auth` path.
35
+
36
+ In order to run this plugin you need to configure the `dash()` and `jwt()` plugins from Better Auth.
37
+
38
+ ```typescript title="src/lib/auth.ts"
39
+ import { dash } from "@better-auth/infra";
40
+ import { betterAuth } from 'better-auth';
41
+ import { jwt } from 'better-auth/plugins';
42
+ import { strapiAdapter } from '@strapi-community/plugin-better-auth';
43
+
44
+ export const auth = betterAuth({
45
+ database: strapiAdapter(),
46
+ trustedOrigins: ['http://localhost:3000'],
47
+ plugins: [
48
+ jwt(),
49
+ dash({
50
+ apiUrl: process.env.STRAPI_URL || "http://localhost:1337",
51
+ apiKey:
52
+ process.env.BETTER_AUTH_DASHBOARD_SECRET ||
53
+ "strapi-internal-dashboard-key",
54
+ }),
55
+ ],
56
+ advanced: {
57
+ database: {
58
+ generateId: 'serial',
59
+ },
60
+ },
61
+ emailAndPassword: {
62
+ enabled: true,
63
+ },
64
+ });
65
+ ```
66
+
67
+ ### Start Strapi
68
+
69
+ ```bash
70
+ pnpm develop
71
+ ```
72
+
73
+ The dashboard is now available in the Strapi admin panel.
74
+
75
+ ## Pages
76
+
77
+ | Tab | Description |
78
+ | --- | ----------- |
79
+ | **Overview** | User metrics, growth charts, cohort retention, active user rings |
80
+ | **Users** | Searchable user table with create, edit, delete, ban, and session revoke per user |
81
+ | **Organizations** | Organization list with member management (requires Better Auth `organization` plugin) |
82
+
83
+ ## Requirements
84
+
85
+ - `@strapi-community/plugin-better-auth` installed and configured
86
+ - Strapi v5.45.0+
87
+ - Better Auth >= 1.4.0
88
+
89
+ ## Resources
90
+
91
+ - [Documentation](https://strapi-community.github.io/plugin-better-auth/docs/better-auth/dashboard)
92
+ - [Better Auth Documentation](https://better-auth.com)
93
+ - [Strapi Documentation](https://docs.strapi.io)
94
+
95
+ ## Authors
96
+
97
+ - [Boaz Poolman](https://github.com/boazpoolman)
98
+
99
+ ## License
100
+
101
+ See the [LICENSE](./LICENSE.md) file for licensing information.