fix(login): prevent hydration redirect loop; show signed-in panel#19
Open
chundawat-h wants to merge 2 commits into
Open
fix(login): prevent hydration redirect loop; show signed-in panel#19chundawat-h wants to merge 2 commits into
chundawat-h wants to merge 2 commits into
Conversation
|
@chundawat-h is attempting to deploy a commit to the Chandan Giri's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:
To read more about collaboration on Vercel, click here. |
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.
Summary
Fixes several login-related issues: hydration mismatch on the login page, unstable tab selection, and automatic redirect that prevented back-navigation. Also reverts unrelated UI/log changes introduced earlier.
Detailed changes
Convert login page to a client-only component and stabilize tab selection using a mount-only read of search params.
Remove the Suspense fallback that caused a server/client markup mismatch and hydration overlay.
Add an "already signed in" UI to avoid immediate redirect. This shows signed-in email and provides "Go to Dashboard" and "Sign Out" actions — preventing back-button loop.
Revert unrelated changes to supabaseClient and AuthContext log/error messages so we only touch login behavior.
Created a local .env file with provided credentials (not committed; it's gitignored).
Testing steps
Start frontend: npm run dev
Visit http://localhost:3000/login
Confirm page no longer shows hydration overlay and the login/signup tabs behave as expected.
If already signed-in, check that the panel appears and back navigation does not immediately redirect to dashboard.