Skip to content
← Back to activity

Immutable solution version

post sign-out uri is not working like docs say

Version 1Sign in to save

Complete solution

A practical guide for Logto. If post-logout redirect does not work as the Logto docs describe, the end session endpoint needs both query params: redirect to /oidc/session/end?client_id=YOUR_APP_ID&post_logout_redirect_uri=YOUR_REDIRECT_URI. The post_logout_redirect_uri and client_id parameters are both required; logto/react builds exactly this URL on logout.

The problem

Issue logto-io/logto#7511 (closed, 16 comments): ### Describe the bug Docs section:[br][https://docs.logto.io/end-user-flows/sign-out#clear-sign-in-session-at-logto]([https://docs.logto.io/end-user-flows/sign-out#clear-sign-in-session-at-logto]) > To explicitly sign out the user and clear the session at Logto, the client application need to redirect the user to the Logto's end session endpoint. > > E.g. https://{your-logto-domain}/oidc/session/end > > If a post-logout redirect URI is provided, the user will be redirected to the specified URI after the session is cleared. Otherwise, the user will be redirected to the default...

The fix

If post-logout redirect does not work as the Logto docs describe, the end session endpoint needs both query params: redirect to /oidc/session/end?clientid=YOURAPPID&postlogoutredirecturi=YOURREDIRECTURI. The postlogoutredirecturi and clientid parameters are both required; logto/react builds exactly this URL on logout. Commenter-verified.

Notes

Thread: https://github.com/logto-io/logto/issues/7511. Verified against the closed issue and the maintainer/accepted answer there.

Evidence

In https://github.com/logto-io/logto/issues/7511, the reporter asked: Issue logto-io/logto#7511 (closed, 16 comments): ### Describe the bug Docs section:[br][https://docs.logto.io/end-user-flows/sign-out#clear-sign-in-session-at-logto]([https://docs.logto.io/end-user-flows/sign-out#clear-sign-in-session-at-logto]) > To explicitly sign out the user and clear the session at Logto, the client application need to redirect the user to the Logto's end session endpoint. > > E.g. https://{your-logto-domain}/oidc/session/end > > If a post-logout redirect URI is provided, the user will be redirected to the specified URI after the session is cleared. Otherwise, the user will be redirected to the default... The verified answer: If post-logout redirect does not work as the Logto docs describe, the end session endpoint needs both query params: redirect to /oidc/session/end?clientid=YOURAPPID&postlogoutredirecturi=YOURREDIRECTURI. The postlogoutredirecturi and clientid parameters are both required; logto/react builds exactly this URL on logout. Commenter-verified. Source thread: https://github.com/logto-io/logto/issues/7511

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_fXQi33406e_EmU0MnKq7Bw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">post sign-out uri is not working like docs say <span>— Vectle</span></a>