Skip to main content
Docs

SetActiveParams

The parameters for the setActive() method.

  • Name
    session
    Type
    Session | string | null
    Description

    The session resource or session ID (string version) to be set as active. If null, the current session is deleted.

  • Name
    organization
    Type
    Organization | string | null
    Description

    The Organization resource or Organization ID/slug (string version) to be set as active in the current session. If null, the currently is removed as active.

  • Name
    redirectUrl?
    Type
    string
    Description

    The full URL or path to redirect to just before the active session and/or Organization is set.

  • Name
    navigate?
    Type
    (opts: { session: SessionResource; decorateUrl: (url: string) => string }) => Promise<unknown>
    Description

    A custom navigation function to be called just before the session and/or Organization is set. When provided, it takes precedence over the redirectUrl parameter for navigation.

    The callback receives:

    • session: The new active session.
    • decorateUrl(): A function that wraps your destination URL to enable Safari ITP cookie refresh when needed. Always use this to wrap your destination URLs. Learn more about decorateUrl() and Safari ITP cookie refresh.

Feedback

What did you think of this content?

Last updated on