✨ Add GET /api/auth/portal-logout for cross-app logout chain#24
Open
awais786 wants to merge 1 commit into
Open
✨ Add GET /api/auth/portal-logout for cross-app logout chain#24awais786 wants to merge 1 commit into
awais786 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds `GET /api/auth/portal-logout?next=` so the foss-server-bundle portal's "Log out of all apps" button can include Penpot in its cross-origin redirect chain.
Same pattern as Pressingly/plane#35 and Pressingly/outline#24. Each app in the chain clears its own native session while the browser is on that app's origin (cross-origin Set-Cookie is impossible from the portal).
What it does
`GET /api/auth/portal-logout?next=<absolute_url>`:
Files
Net: 5 files, +176 / -11.
Tests
8 cases covering the pure-function `allowed-next?` predicate:
The handler itself is exercised via integration in the FOSS bundle (with a real session it 302s + clears the cookie; with rejected `?next=` it 200s + clears the cookie). Test docstring notes this.
Config
Out of scope