Skip to content

Preserve url parameters after oidc redirect #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 29, 2025

Conversation

lovasoa
Copy link
Collaborator

@lovasoa lovasoa commented Jul 28, 2025

Preserve query parameters during OIDC authentication redirects to maintain user context.

Previously, the initial_url stored in the OIDC state only captured the URL path, causing query parameters to be lost upon redirect back from the OIDC provider. This PR modifies the OIDC flow to capture the full URI, including query parameters, and introduces robust URL validation (build_safe_redirect_url, validate_redirect_url) to prevent open redirect vulnerabilities while preserving the original user intent.


Open in WebOpen in CursorOpen Docs

@lovasoa
Copy link
Collaborator Author

lovasoa commented Jul 28, 2025

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


Bugbot free trial expires on August 9, 2025
Learn more in the Cursor dashboard.

@lovasoa lovasoa linked an issue Jul 28, 2025 that may be closed by this pull request
@lovasoa lovasoa merged commit b5d4f4b into main Jul 29, 2025
10 checks passed
@lovasoa lovasoa deleted the cursor/preserve-url-parameters-after-oidc-redirect-2c78 branch July 29, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OIDC SSO lose Query parameter of original page
2 participants