@orsetra/shared-auth 1.1.4 → 1.1.5

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.
@@ -44,8 +44,14 @@ export function ZitadelProvider({ children, config, renderSessionExpiredAction }
44
44
  ZitadelAuthService.onSessionExpired = () => setSessionExpired(true)
45
45
  setIsConfigured(true)
46
46
 
47
+ const isAuthenticated = await ZitadelAuthService.isAuthenticated()
48
+ if (!isAuthenticated) {
49
+ await ZitadelAuthService.signIn()
50
+ return
51
+ }
52
+
47
53
  const currentUser = await ZitadelAuthService.getUser()
48
- setUser(currentUser?.expired ? null : currentUser)
54
+ setUser(currentUser)
49
55
  } catch (error) {
50
56
  console.error("Failed to configure Zitadel auth:", error)
51
57
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-auth",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Shared authentication utilities for Orsetra platform using Zitadel",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",