@voyantjs/auth-react 0.24.0 → 0.24.2
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 +16 -3
- package/package.json +6 -6
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
|
|
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.24.
|
|
3
|
+
"version": "0.24.2",
|
|
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.24.
|
|
44
|
+
"@voyantjs/auth": "0.24.2"
|
|
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.24.
|
|
56
|
-
"@voyantjs/react": "0.24.
|
|
55
|
+
"@voyantjs/auth": "0.24.2",
|
|
56
|
+
"@voyantjs/react": "0.24.2",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.24.
|
|
60
|
+
"@voyantjs/react": "0.24.2"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "tsc -p tsconfig.json",
|
|
70
|
-
"clean": "rm -rf dist",
|
|
70
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
71
71
|
"typecheck": "tsc --noEmit",
|
|
72
72
|
"lint": "biome check src/",
|
|
73
73
|
"test": "vitest run --passWithNoTests"
|