---
reference:
  js:
    - key: refreshAndSealSessionData
      id: refresh_and_seal_session_data
      url: /reference/authkit/authentication/refresh-and-seal-session-data
      title: userManagement.refreshAndSealSessionData()
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: sessionData
              type: string
              description: (authentication.session_data)
            - key: cookiePassword
              type: string
              description: (authentication.cookie_password_seal)
      returns:
        - key: anonymous
          type: object
          unwrap: true
          properties:
            - key: authenticated
              type: boolean
              description: (authentication.authenticated)
            - key: sealedSession
              type: string
              description: (authentication.sealed_session)
            - key: reason
              type: >-
                "invalid_jwt" | "invalid_session_cookie" |
                "no_session_cookie_provided" | "invalid_grant" |
                "organization_not_authorized"
              optional: true
              description: >-
                The reason authentication failed. Only present if `authenticated
                = false`.
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/authkit/authentication/refresh-and-seal-session-data.mdx
---

## Refresh and seal session data

Unseals the provided session data from a user's session cookie, [authenticates with the existing refresh token](/reference/authkit/authentication/refresh-token), and returns the sealed data for the refreshed session.

<CodeBlock referenceId="refresh_and_seal_session_data">
  <CodeBlockTab title="Request" file="refresh-and-seal-session-data-request" />
  <CodeBlockTab
    title="Success response"
    file="refresh-and-seal-session-data-success-response"
  />
  <CodeBlockTab
    title="Failure response"
    file="refresh-and-seal-session-data-failure-response"
  />
</CodeBlock>
