Update Logout Flow
GET {{baseUrl}}/self-service/logout?token=<string>&return_to=<string>
This endpoint logs out an identity in a self-service manner.
If the Accept HTTP header is not set to application/json, the browser will be redirected (HTTP 303 See Other)
to the return_to parameter of the initial request or fall back to urls.default_return_to.
If the Accept HTTP header is set to application/json, a 204 No Content response
will be sent on successful logout instead.
This endpoint is NOT INTENDED for API clients and only works
with browsers (Chrome, Firefox, ...). For API clients you can
call the /self-service/logout/api URL directly with the Ory Session Token.
More information can be found at Ory Kratos User Logout Documentation.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
token | string | A Valid Logout Token |
If you do not have a logout token because you only have a session cookie,
call /self-service/logout/browser to generate a URL for this endpoint. |
| return_to | string | | The URL to return to after the logout was completed. |
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
Cookie | string | HTTP Cookies |
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected. |
| Accept | string | | |