Add applicationld in the gate app redirection#740
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR re-adds the applicationId query parameter to the Gate app redirection URL, which was previously removed in PR #624. This parameter is now needed to support self-registration functionality in the Gate app. While the ideal approach would be to retrieve this from the flowId, this is a temporary solution until that can be implemented.
Key Changes
- Added a constant
AppIDwith value"applicationId"in the OAuth2 constants - Modified authorization handler to include the application ID in query parameters when redirecting to the Gate app login page
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| backend/internal/oauth/oauth2/constants/constants.go | Added new constant AppID for the application identifier query parameter |
| backend/internal/oauth/oauth2/authz/handler.go | Added applicationId to the query parameters when redirecting to the login page |
| SessionDataKey string = "sessionDataKey" | ||
| SessionDataKeyConsent string = "sessionDataKeyConsent" | ||
| ShowInsecureWarning string = "showInsecureWarning" | ||
| AppID string = "applicationId" |
There was a problem hiding this comment.
The constant value "applicationId" is inconsistent with the existing test expectation. The test in handler_test.go line 269 uses "appId" as the query parameter key. This mismatch will cause the tests to fail and may break the frontend integration with the Gate app if it expects "appId" instead of "applicationId".
Consider using AppID string = "appId" instead to match the existing test expectations and maintain consistency with the codebase.
| AppID string = "applicationId" | |
| AppID string = "appId" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #740 +/- ##
=======================================
Coverage 81.88% 81.88%
=======================================
Files 252 252
Lines 20167 20168 +1
Branches 351 351
=======================================
+ Hits 16514 16515 +1
Misses 2609 2609
Partials 1044 1044
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Purpose
With this #624, we have removed the appId in the redirection to the Gate App. It is now needed to support the self registration in the Gate app. Ideally it should be retrieved from the flowId, but for the time being we are adding it back to the redirection.
Approach
Add applicationld in the gate app redirection
Related Issues
Related PRs
Checklist
Security checks