---
descriptions:
  logout:
    session_data: WorkOS session cookie value from the user's browser.
    cookie_password_unseal: >
      Password used to unseal the session cookie. Must be the same as the
      password used to seal the cookie. Can optionally be specified as the
      `WORKOS_COOKIE_PASSWORD` environment variable.
reference:
  js:
    - key: getLogoutUrlFromSessionCookie
      id: get_logout_url_from_session_cookie
      url: /reference/authkit/logout/get-logout-url-from-session-cookie
      title: userManagement.getLogoutUrlFromSessionCookie()
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: sessionData
              type: string
              description: (logout.session_data)
            - key: cookiePassword
              type: string
              optional: true
              description: (logout.cookie_password_unseal)
            - key: returnTo
              type: string
              optional: true
              description: (logout.return_to)
      returns:
        - key: url
          type: string
          description: (logout.url)
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/authkit/logout/get-logout-url-from-session-cookie.mdx
---

# Get logout URL from session cookie

Generates the logout URL by extracting the session ID from the session cookie. Use this over `getLogoutUrl` if you don't have a saved reference to the session ID and you'd like the SDK to handle extracting the session ID from the cookie for you.

<CodeBlock referenceId="get_logout_url_from_session_cookie">
  <CodeBlockTab
    title="Request"
    file="get-logout-url-from-session-cookie-request"
  />
  <CodeBlockTab
    title="Response"
    file="get-logout-url-from-session-cookie-response"
  />
</CodeBlock>
