GET
/
api
/
v1
/
auth
/
logout
Initiates the logout process by redirecting the user to Auth0’s logout endpoint. This will clear the Auth0 session and optionally redirect the user back to a specified URL.

Flow

  1. User accesses this endpoint with an optional returnTo parameter
  2. Server redirects to Auth0’s logout endpoint
  3. Auth0 clears the user’s session
  4. Auth0 redirects to the returnTo URL (if provided and allowed)
No authentication is required to access this endpoint.

Parameters

returnTo
string
URL to redirect the user after logout (must be in allowed URLs)

Example

curl "https://api.garnet.ai/v1/auth/logout?returnTo=http://localhost:3000"

Response

Returns a 302 redirect to Auth0’s logout endpoint.