-
Notifications
You must be signed in to change notification settings - Fork 429
feat: simplify PAR parameter handling by removing redundant filtering #2298
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
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
- Implement selective parameter forwarding for PAR requests - Add SAFE_PAR_PARAMETERS whitelist for UI/UX parameters - Maintain security by blocking authorization parameters - Add comprehensive test coverage for PAR parameter handling - Fixes screen_hint signup flow when PAR is enabled This change resolves the issue where screen_hint=signup parameter was being blocked when Pushed Authorization Requests (PAR) was enabled, preventing users from being directed to the signup screen. The fix implements a security-conscious approach by whitelisting only safe UI parameters while continuing to block potentially dangerous authorization parameters, maintaining PAR's security benefits while restoring essential UX functionality.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2298 +/- ##
==========================================
- Coverage 85.37% 85.37% -0.01%
==========================================
Files 26 26
Lines 2619 2618 -1
Branches 482 480 -2
==========================================
- Hits 2236 2235 -1
Misses 377 377
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…tjs-auth0 into bugfix/screen-hint-par
nandan-bhat
reviewed
Sep 10, 2025
nandan-bhat
approved these changes
Sep 15, 2025
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.
Removes PAR parameter blocklist logic and leverages PAR's inherent security model for cleaner, more maintainable code. All parameters are now forwarded to PAR's encrypted request body when enabled.
📋 Changes
The original
handleLogin
method used a filter that blocked all custom authorization parameters and increased complexity. PAR already secures parameters by moving them from URLs to encrypted request bodies, making client-side filtering redundant.Changed
src/server/auth-client.ts
: Simplified parameter handling inhandleLogin
methodChanged
src/server/auth-client.test.ts
: Updated test expectations to match new forwarding behavior🎯 Testing
Automated:
All 305 existing tests pass with updated expectations for PAR parameter forwarding behavior.
Manual:
/auth/login?screen_hint=signup&custom_param=value
redirect_uri
cannot be overridden via query parameters