Olympus Docs
ReferenceAPIsOry Identities APIfrontend

Create a Logout URL for Browsers

This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.

GET /self-service/logout/browser

This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.

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.

The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error.

When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.

Operation ID: createBrowserLogoutFlow    Tag: frontend

Query parameters

NameTypeRequiredDescription
return_tostringnoReturn to URL The URL to which the browser should be redirected to after the logout has been performed.

Header parameters

NameTypeRequiredDescription
cookiestringnoHTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.

Responses

StatusDescriptionBody
200logoutFlowapplication/json, object
400errorGenericapplication/json, object
401errorGenericapplication/json, object
500errorGenericapplication/json, object

Generated from /tmp/kratos-api.json at build time.

On this page