# Sign customers out of Pliro

When a customer signs out of your website you may optionally sign them out of Pliro using [the OpenID Connect RP-Initiated Logout mechanism](https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RedirectionAfterLogout).

You do this by redirecting them to Pliro's end session endpoint:

```
HTTP/1.1 302 Found
Location: https://example-publication.plirotest.page/oauth/end_session?
  client_id=example-client-id&
  id_token_hint=example-id-token&
  post_logout_redirect_uri=https%3A%2F%2Fexample.com
```

This endpoint accepts the following query parameters:

* `client_id`: Should be set to the client ID shown for your OAuth application in the Pliro dashboard.
* `id_token_hint`: Should be set to the ID token received when the customer signed into your website.
* `post_logout_redirect_uri`: Should be set to a URI to redirect the customer to, after signing them out of Pliro. If set, this URI must match the URI that is registered for the OAuth application in the Pliro dashboard.

After the customer is signed out of Pliro, they are redirected to the `post_logout_redirect_uri`.

```
HTTP/1.1 302 Found
Location: https://example.com
```

To prevent abuse, a valid `id_token_hint` is required to automatically sign the customer out of Pliro. If `id_token_hint` is missing or invalid, the customer will have to confirm signing out.

To prevent [unvalidated redirects](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html), Pliro will only redirect the customer to the `post_logout_redirect_uri` if it corresponds to the post-logout redirect URI registered for the OAuth application identified by `client_id` or the `aud` claim in the provided `id_token_hint`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pliro.co/connect/sign-customers-out-of-pliro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
