-
Notifications
You must be signed in to change notification settings - Fork 90
[ES-2743] added state in fetch user info #540
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
Conversation
Signed-off-by: Zeeshan Mehboob <[email protected]>
WalkthroughOAuth state parameter handling is introduced in the UserProfile component. The state value is read from the URL query string and threaded through the login flow, passing from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
mock-relying-party-ui-esim/src/pages/UserProfile.js
🧰 Additional context used
🧬 Code graph analysis (1)
mock-relying-party-ui-esim/src/pages/UserProfile.js (3)
mock-relying-party-ui-esim/src/constants/clientDetails.js (1)
state(17-17)mock-relying-party-ui-esim/src/hooks/useExternalScript.js (1)
state(4-4)mock-relying-party-ui-esim/src/pages/Home.js (1)
state(11-11)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: mock-identity-system / build-dockers
- GitHub Check: mock-relying-party-ui-esim / build-dockers
- GitHub Check: mock-relying-party-ui / build-dockers
- GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (2)
mock-relying-party-ui-esim/src/pages/UserProfile.js (2)
50-51: Ensure state is validated before fetching user details.The state parameter is passed to
getUserDetailswithout validation. State validation should occur immediately after reading from the URL (before line 50) to fail fast and prevent unnecessary API calls with potentially tampered parameters.As noted in the previous comment, please verify that state validation is implemented.
60-74: Confirm state parameter inclusion in userinfo request.The
post_fetchUserInfofunction sends the state parameter in the request body to the userinfo endpoint (line 77), which deviates from standard OAuth 2.0 and OpenID Connect specifications. The Access Token from OpenID Connect should be sent as a Bearer Token in the request, typically via the Authorization header, with no state parameter included.Verify with your authorization server implementation whether the state parameter is actually required. If not, remove state from the request and validate it client-side before calling
post_fetchUserInfo.



Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.