fix: remove duplicate error rendering and fix Google OAuth redirect URL in Auth.tsx - #415
Closed
saurabhhhcodes wants to merge 1 commit into
Closed
fix: remove duplicate error rendering and fix Google OAuth redirect URL in Auth.tsx#415saurabhhhcodes wants to merge 1 commit into
saurabhhhcodes wants to merge 1 commit into
Conversation
…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)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bugs Fixed
1. Duplicate
errors.passwordrenderingPassword 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`. Sincewindow.location.hrefincludes the full path (e.g.,http://localhost:5173/auth), this produced an invalid URL likehttp://localhost:5173/authoauth. The OAuth callback expects/auth/oauth.Fix: Use
window.location.originto get just the base URL:`${window.location.origin}/auth/oauth`.