Fix frontend login to use /auth/login#31
Merged
gitgrahamdunn merged 1 commit intomainfrom Feb 18, 2026
Merged
Conversation
|
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.
Motivation
import.meta.env.VITE_API_URLand call the backendPOST /auth/loginendpoint exactly.Description
VITE_API_URL(strip trailing slash) and ensureAPI_BASE_URLis used to build requests so calls resolve to${API_BASE_URL}/auth/loginwith no hardcoded/apiprefix.requestandrequestFormso failed fetches log a structured console error and throw a clear messageNetwork request failed. Check your connection and API URL..POST /auth/loginand preserve token handling (the app still callssetToken(result.access_token)and the existing localStorage flow remains unchanged).App.tsxby clearing stale errors on submit, logging auth failures to console, showing an inline error banner on the login form, disabling the submit button while in-flight, and showingSigning in...during submission.Testing
npm run buildand the build succeeded.npm run dev -- --host 0.0.0.0 --port 4173and manually exercised the login form to verify disabled button and error display.http://127.0.0.1:4173/to capture the updated login form screenshot (artifact produced).Codex Task