Skip to content

fix: remove duplicate error rendering and fix Google OAuth redirect URL in Auth.tsx - #415

Closed
saurabhhhcodes wants to merge 1 commit into
pooranjoyb:masterfrom
saurabhhhcodes:fix/popShop-batch-5
Closed

fix: remove duplicate error rendering and fix Google OAuth redirect URL in Auth.tsx#415
saurabhhhcodes wants to merge 1 commit into
pooranjoyb:masterfrom
saurabhhhcodes:fix/popShop-batch-5

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Bugs Fixed

1. Duplicate errors.password rendering

Password validation errors were rendered twice in the JSX because the same error-mapping block appeared consecutively (lines 525-544). This caused all password-related error messages to appear duplicated to the user.

Fix: Removed the duplicate JSX block.

2. Incorrect Google OAuth redirect URL

The redirect URL used string concatenation: `${window.location.href}oauth`. Since window.location.href includes the full path (e.g., http://localhost:5173/auth), this produced an invalid URL like http://localhost:5173/authoauth. The OAuth callback expects /auth/oauth.

Fix: Use window.location.origin to get just the base URL: `${window.location.origin}/auth/oauth`.

…RL in Auth.tsx

- Remove duplicate errors.password JSX block that rendered password validation messages twice
- Fix Google OAuth redirectTo URL: use window.location.origin + /auth/oauth instead of string-concatenating window.location.href (which appended 'oauth' directly to the current path)
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
pop-shop Ready Ready Preview, Comment Jul 27, 2026 12:06am

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