Skip to content

Conversation

@Shitanshukumar607
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings October 5, 2025 12:16
@vercel
Copy link

vercel bot commented Oct 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
img-to-svg Building Building Preview Comment Oct 5, 2025 0:16am

@Shitanshukumar607 Shitanshukumar607 merged commit f3c2aa9 into main Oct 5, 2025
4 of 6 checks passed
Copy link

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 fixes an authentication redirect issue in development by replacing server-side environment variable with client-side origin detection for OAuth callback URLs.

  • Replaces process.env.SITE_URL with window.location.origin for OAuth redirect URL construction

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

provider,
options: {
redirectTo: `${process.env.SITE_URL}/auth/callback`,
redirectTo: `${window.location.origin}/auth/callback`,
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

Using window.location.origin for redirect URLs can be a security risk as it allows potential redirect attacks. Consider validating the origin against a whitelist of allowed domains or using a server-side environment variable with proper fallback logic for development.

Copilot uses AI. Check for mistakes.
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.

2 participants