@voyantjs/auth-react 0.23.0 → 0.24.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.
Files changed (2) hide show
  1. package/README.md +16 -3
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @voyantjs/auth-react
2
2
 
3
- React runtime package for Voyant authentication and workspace state.
3
+ React runtime package for Voyant authentication and optional workspace state.
4
4
 
5
5
  This package wraps the shared Voyant auth HTTP contract:
6
6
 
7
7
  - `/auth/me`
8
8
  - `/auth/status`
9
- - `/auth/workspace`
9
+ - `/auth/workspace/current`
10
10
  - `/auth/workspace/active-organization`
11
11
  - `/auth/organization/list-members`
12
12
  - `/auth/organization/list-invitations`
@@ -17,7 +17,20 @@ This package wraps the shared Voyant auth HTTP contract:
17
17
 
18
18
  It provides reusable React surfaces for:
19
19
 
20
- - current user and workspace state
20
+ - current user state
21
+ - optional workspace and organization state
21
22
  - organization member listing
22
23
  - organization invitation listing
23
24
  - invite, cancel, remove, and role update mutations
25
+
26
+ ## Single-Tenant Apps
27
+
28
+ Single-tenant operator apps should bootstrap their shell from `useCurrentUser()`
29
+ or `/auth/me` only. `useCurrentWorkspace()`, `useWorkspaceMutation()`,
30
+ organization member hooks, and invitation hooks are opt-in team/workspace
31
+ surfaces for apps that expose Better Auth organization routes.
32
+
33
+ Do not make workspace queries part of the base admin loading gate unless the app
34
+ intentionally requires organization switching or team management. Apps that do
35
+ not mount the organization routes can still use the current-user hooks without
36
+ providing `/auth/workspace/current` or `/auth/organization/*` endpoints.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/auth-react",
3
- "version": "0.23.0",
3
+ "version": "0.24.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,7 +41,7 @@
41
41
  "react": "^19.0.0",
42
42
  "react-dom": "^19.0.0",
43
43
  "zod": "^4.0.0",
44
- "@voyantjs/auth": "0.23.0"
44
+ "@voyantjs/auth": "0.24.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@tanstack/react-query": "^5.96.2",
@@ -52,12 +52,12 @@
52
52
  "typescript": "^6.0.2",
53
53
  "vitest": "^4.1.2",
54
54
  "zod": "^4.3.6",
55
- "@voyantjs/auth": "0.23.0",
56
- "@voyantjs/react": "0.23.0",
55
+ "@voyantjs/auth": "0.24.1",
56
+ "@voyantjs/react": "0.24.1",
57
57
  "@voyantjs/voyant-typescript-config": "0.1.0"
58
58
  },
59
59
  "dependencies": {
60
- "@voyantjs/react": "0.23.0"
60
+ "@voyantjs/react": "0.24.1"
61
61
  },
62
62
  "files": [
63
63
  "dist"