Home > @uniformdev/mesh-sdk-react > DelegationProvider

DelegationProvider() function

Warning: This API is now obsolete.

This beta identity delegation API may change with breaking changes.

Manages the identity delegation lifecycle: checks for an existing session, acquires a session token from the dashboard parent if needed, and delegates exchange to the caller.

Should ONLY be used to wrap locations which actually needed delegation and not the entire app like .

Also handles stale-session recovery: when the tab becomes visible again after being hidden for longer than revalidateAfterMs, the provider silently re-checks via checkActive and re-runs the session exchange only if the server says the session is no longer active. This covers the "returned after a long time" case where the stored access token has expired and the refresh token is also gone or no longer valid.

Mid-session expiry (visible tab, BFF returns delegation_expired, which awaits re-exchange and retries the failed request once.

Signature:

Parameters

Parameter

Type

Description

{ sdk, onSessionToken, checkActive, revalidateOnFocus, revalidateAfterMs, children, }

(not declared)

input

DelegationProviderProps

Returns:

_emotion_react_jsx_runtime.JSX.Element