Skip to content

fix(login): properly encode redirect URL#5478

Open
utafrali wants to merge 4 commits intoscaleway:mainfrom
utafrali:fix/issue-5477-scw-login-gives-invalid-app-to-redirect
Open

fix(login): properly encode redirect URL#5478
utafrali wants to merge 4 commits intoscaleway:mainfrom
utafrali:fix/issue-5477-scw-login-gives-invalid-app-to-redirect

Conversation

@utafrali
Copy link
Copy Markdown

Description

The callback URL in the login flow wasn't getting properly URL-encoded when passed as a query parameter. The auth server was rejecting the redirect because of the unescaped special characters. Switched to using url.Values to handle the encoding instead of raw string concatenation.

Related issues

Fixes #5477

Release note

Fixed login flow redirect URL encoding issue that was causing "Invalid App to redirect" errors.

@utafrali utafrali requested a review from remyleone as a code owner April 11, 2026 10:40
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.16%. Comparing base (8e9fb91) to head (4dd00dc).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/namespaces/login/login.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5478      +/-   ##
==========================================
- Coverage   51.16%   51.16%   -0.01%     
==========================================
  Files         324      324              
  Lines       75683    75685       +2     
==========================================
  Hits        38726    38726              
- Misses      35480    35482       +2     
  Partials     1477     1477              

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@remyleone
Copy link
Copy Markdown
Member

@utafrali thanks a lot :) could you sign your commits?

@utafrali
Copy link
Copy Markdown
Author

Done, pushed the fix.

@remyleone
Copy link
Copy Markdown
Member

@utafrali Could you ensure that github knows your key for the signature here: https://github.com/settings/keys Otherwise, we won't be able to merge your contribution.

@utafrali
Copy link
Copy Markdown
Author

Got it, adding the key to my GitHub settings now.

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.

scw login gives Invalid App to redirect

4 participants