CI HUBCI HUB SDK
AuthenticationCI HUB Auth

Logout

End the partner-side session and stop using the CI HUB tokens.

GET
/auth/logout

Signals the end of a partner-side session. For Access SDK partners this endpoint is advisory: CI HUB does not maintain server-side session state for SDK tokens, so logout returns 200 without revoking the refresh token. The partner platform is responsible for discarding the cached access and refresh tokens locally.

CI HUB does not currently maintain a refresh-token blocklist for Access SDK partners. A refresh token remains valid until its 30-day clock runs out, even after a logout call. Partners that need stronger revocation guarantees should:

  • Drop both the access token and the refresh token from local storage on logout.
  • Not persist refresh tokens beyond the active session.
  • Detect compromise on the partner side and avoid reusing a leaked refresh token.

Server-side revocation is in progress.

Authorization

CIHubAuth
AuthorizationBearer <token>

The CI-HUB JWT token obtained through authentication. Needs to be sent in the Authorization header.

In: header

Response Body

application/json

curl -X GET "https://example.com/auth/logout"
Empty
{
  "message": "Error",
  "details": "POST /api/v1/auth/exchangeToken failed: SDK authentication token is invalid",
  "errorCode": "cihub-sdk-token-invalid",
  "error": {
    "code": "integration-forbidden",
    "source": "cihub",
    "status": 400,
    "message": "Access denied by the integration",
    "details": "403 Forbidden - insufficient_permissions",
    "provider": "bynder"
  }
}

Example

import { CiHubAccessClient, TokenManager } from '@ci-hub/access-sdk'

const client = new CiHubAccessClient({ baseUrl: 'https://stage.ci-hub.com/api/v1' })
const tokens = new TokenManager(client) // seeded during authentication

// Advisory server logout, then the CI HUB and DAM sessions are dropped from storage.
await tokens.logout()
curl "https://stage.ci-hub.com/api/v1/auth/logout" \
  -H "Authorization: Bearer $CI_HUB_ACCESS_TOKEN"
await fetch('https://stage.ci-hub.com/api/v1/auth/logout', {
  headers: { Authorization: `Bearer ${ciHubAccessToken}` },
})

// Drop cached tokens regardless of the response status.
clearCachedCiHubTokens()

Next

On this page