Skip to content

Bugfix: OAuth login redirect not working#4837

Open
feyruzb wants to merge 2 commits intoEricsson:masterfrom
feyruzb:bugfix/oauth-provider-redirect
Open

Bugfix: OAuth login redirect not working#4837
feyruzb wants to merge 2 commits intoEricsson:masterfrom
feyruzb:bugfix/oauth-provider-redirect

Conversation

@feyruzb
Copy link
Copy Markdown
Collaborator

@feyruzb feyruzb commented May 5, 2026

This PR fixes the OAuth login flow which was broken when redirecting to external authorization URLs.

The bug

router.push({ path: url }) is intended for client-side navigation within the SPA. When passed an external URL (such as the OAuth provider's authorization endpoint), Vue Router attempts to match it against the defined routes, fails, and falls through to the 404 handler instead of redirecting the browser. window.location.href is the correct API for navigating to external URLs.

Reproduction: attempt to log in via GitHub OAuth, observe the error in the console:
OAuth createLink failed: 'scope'

The fix

  • Login.vue: replaced router.push({ path: url }) with window.location.href = url, the correct API for navigating to external URLs.
  • index.js: corrected the casing of the OAuth login route path from /login/oAuthlogin/:provider to /login/OAuthLogin/:provider for consistency.

Testing

Tested locally by logging in via GitHub OAuth. The redirect to the provider now works correctly.

@feyruzb feyruzb requested a review from gulyasgergely902 May 5, 2026 14:13
@feyruzb feyruzb requested review from bruntib and vodorok as code owners May 5, 2026 14:13
@feyruzb feyruzb self-assigned this May 5, 2026
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.

1 participant