@orsetra/shared-auth 1.0.8 → 1.0.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/SessionProvider.tsx +3 -0
- package/ZitadelProvider.tsx +3 -0
- package/package.json +54 -54
package/SessionProvider.tsx
CHANGED
|
@@ -29,6 +29,9 @@ export function SessionProvider({ children, config }: SessionProviderProps) {
|
|
|
29
29
|
const [isLoading, setIsLoading] = useState(true)
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
|
+
// Skip on server-side
|
|
33
|
+
if (typeof window === 'undefined') return
|
|
34
|
+
|
|
32
35
|
// Configure auth only on client side
|
|
33
36
|
if (!ZitadelAuthService.isConfigured()) {
|
|
34
37
|
ZitadelAuthService.configureAuth(config)
|
package/ZitadelProvider.tsx
CHANGED
|
@@ -32,6 +32,9 @@ export function ZitadelProvider({ children, config }: ZitadelProviderProps) {
|
|
|
32
32
|
const [user, setUser] = useState<User | null>(null)
|
|
33
33
|
|
|
34
34
|
useEffect(() => {
|
|
35
|
+
// Skip on server-side
|
|
36
|
+
if (typeof window === 'undefined') return
|
|
37
|
+
|
|
35
38
|
const configure = async () => {
|
|
36
39
|
try {
|
|
37
40
|
ZitadelAuthService.configureAuth(config)
|
package/package.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@orsetra/shared-auth",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Shared authentication utilities for Orsetra platform using Zitadel",
|
|
5
|
-
"main": "./index.ts",
|
|
6
|
-
"types": "./index.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.ts",
|
|
9
|
-
"./config": "./config/zitadel.config.ts",
|
|
10
|
-
"./services": "./services/zitadel.auth.service.ts",
|
|
11
|
-
"./components": "./components/index.ts",
|
|
12
|
-
"./utils": "./utils/index.ts"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"index.ts",
|
|
16
|
-
"ZitadelProvider.tsx",
|
|
17
|
-
"SessionProvider.tsx",
|
|
18
|
-
"ProtectedRoute.tsx",
|
|
19
|
-
"config",
|
|
20
|
-
"services",
|
|
21
|
-
"components",
|
|
22
|
-
"hooks",
|
|
23
|
-
"utils",
|
|
24
|
-
"README.md"
|
|
25
|
-
],
|
|
26
|
-
"publishConfig": {
|
|
27
|
-
"access": "public"
|
|
28
|
-
},
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "https://github.com/orsetra/console-ui.git",
|
|
32
|
-
"directory": "packages/shared-auth"
|
|
33
|
-
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
"authentication",
|
|
36
|
-
"zitadel",
|
|
37
|
-
"oidc",
|
|
38
|
-
"oauth2",
|
|
39
|
-
"orsetra"
|
|
40
|
-
],
|
|
41
|
-
"peerDependencies": {
|
|
42
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
43
|
-
"react-dom": "^18.0.0 || ^19.0.0",
|
|
44
|
-
"next": "^14.0.0 || ^15.0.0"
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"oidc-client-ts": "^3.2.1",
|
|
48
|
-
"jose": "^5.9.6"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@types/react": "^19",
|
|
52
|
-
"typescript": "^5"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@orsetra/shared-auth",
|
|
3
|
+
"version": "1.0.10",
|
|
4
|
+
"description": "Shared authentication utilities for Orsetra platform using Zitadel",
|
|
5
|
+
"main": "./index.ts",
|
|
6
|
+
"types": "./index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.ts",
|
|
9
|
+
"./config": "./config/zitadel.config.ts",
|
|
10
|
+
"./services": "./services/zitadel.auth.service.ts",
|
|
11
|
+
"./components": "./components/index.ts",
|
|
12
|
+
"./utils": "./utils/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"index.ts",
|
|
16
|
+
"ZitadelProvider.tsx",
|
|
17
|
+
"SessionProvider.tsx",
|
|
18
|
+
"ProtectedRoute.tsx",
|
|
19
|
+
"config",
|
|
20
|
+
"services",
|
|
21
|
+
"components",
|
|
22
|
+
"hooks",
|
|
23
|
+
"utils",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/orsetra/console-ui.git",
|
|
32
|
+
"directory": "packages/shared-auth"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"authentication",
|
|
36
|
+
"zitadel",
|
|
37
|
+
"oidc",
|
|
38
|
+
"oauth2",
|
|
39
|
+
"orsetra"
|
|
40
|
+
],
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
43
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
44
|
+
"next": "^14.0.0 || ^15.0.0"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"oidc-client-ts": "^3.2.1",
|
|
48
|
+
"jose": "^5.9.6"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/react": "^19",
|
|
52
|
+
"typescript": "^5"
|
|
53
|
+
}
|
|
54
|
+
}
|