@orsetra/shared-auth 1.1.3 → 1.1.4
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/ZitadelProvider.tsx +1 -2
- package/package.json +1 -1
package/ZitadelProvider.tsx
CHANGED
|
@@ -24,7 +24,6 @@ const ZitadelContext = createContext<ZitadelContextType | undefined>(undefined)
|
|
|
24
24
|
export interface ZitadelProviderProps {
|
|
25
25
|
children: ReactNode
|
|
26
26
|
config: ZitadelConfig
|
|
27
|
-
/** Render the action button shown inside the session-expired modal. Receives the sign-in handler. */
|
|
28
27
|
renderSessionExpiredAction?: (onReauthenticate: () => void) => ReactNode
|
|
29
28
|
}
|
|
30
29
|
|
|
@@ -46,7 +45,7 @@ export function ZitadelProvider({ children, config, renderSessionExpiredAction }
|
|
|
46
45
|
setIsConfigured(true)
|
|
47
46
|
|
|
48
47
|
const currentUser = await ZitadelAuthService.getUser()
|
|
49
|
-
setUser(currentUser)
|
|
48
|
+
setUser(currentUser?.expired ? null : currentUser)
|
|
50
49
|
} catch (error) {
|
|
51
50
|
console.error("Failed to configure Zitadel auth:", error)
|
|
52
51
|
} finally {
|