Skip to content

Add applicationld in the gate app redirection#740

Merged
senthalan merged 1 commit intoasgardeo:mainfrom
senthalan:add-appid
Nov 13, 2025
Merged

Add applicationld in the gate app redirection#740
senthalan merged 1 commit intoasgardeo:mainfrom
senthalan:add-appid

Conversation

@senthalan
Copy link
Contributor

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

  • N/A

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Copilot AI review requested due to automatic review settings November 13, 2025 09:30
@senthalan senthalan enabled auto-merge November 13, 2025 09:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 AppID with 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"
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
AppID string = "applicationId"
AppID string = "appId"

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.88%. Comparing base (a7cebc4) to head (ad200d6).
⚠️ Report is 3 commits behind head on main.

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           
Flag Coverage Δ
backend-combined-postgres 56.14% <100.00%> (+<0.01%) ⬆️
backend-combined-sqlite 56.14% <100.00%> (+<0.01%) ⬆️
backend-integration-postgres 56.14% <100.00%> (+<0.01%) ⬆️
backend-integration-sqlite 56.14% <100.00%> (+<0.01%) ⬆️
backend-unit 62.02% <100.00%> (+<0.01%) ⬆️
frontend-apps-develop-unit 62.02% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@senthalan senthalan merged commit 2e14b62 into asgardeo:main Nov 13, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants