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.
When an SP-initiated SAML login fails at the ACS endpoint, GoTrue currently sends the error to
GOTRUE_SITE_URL, even when the login requested an allowed browser callback. With a desktop SiteURL, the browser opens AppFlowy Desktop and hides the original SAML error behind its generic login message.Preserve the allowlisted callback from the server-stored RelayState before expiry checks and consumption, and use it for subsequent ACS errors. Keep the existing OAuth error fields and retain SiteURL fallback for absent, unknown, or disallowed callbacks. Callback form parameters, Referer headers, and IdP-supplied URLs cannot choose the error redirect.
Validation:
go test ./internal/api -run '^TestSSO$' -count=1passed against a disposable PostgreSQL 16 database. The new regression reproduced the browser-to-desktop redirect before the fix and covers validation failure after state consumption, expired state, desktop callbacks, allowlist rejection, and missing/untrusted state. No schema changes.This change requires a rebuilt GoTrue image. A missing RelayState still cannot recover its callback; signup policy and assertion validation are unchanged.