Skip to content

[8.x] Restore 204 response for login and logout endpoints - #1195

Closed
JoshSalway wants to merge 1 commit into
laravel:8.xfrom
JoshSalway:fix/restore-204-auth-response
Closed

[8.x] Restore 204 response for login and logout endpoints#1195
JoshSalway wants to merge 1 commit into
laravel:8.xfrom
JoshSalway:fix/restore-204-auth-response

Conversation

@JoshSalway

Copy link
Copy Markdown

Summary

  • Restores response(status: 204) return from UserController::login() and UserController::logout() that was present in 7.x (PR Fix favicon 404s triggered when using loginAs() or logout() methods #1061) but lost during the 8.x branch creation
  • Without the 204 response, WebDriver waits indefinitely for page readiness after auth actions, causing intermittent loginAs() failures (#1152) and unnecessary favicon 404 requests

Problem

The fix from PR #1061 (commit 076865d) correctly returned a 204 No Content response from both endpoints to signal to WebDriver that navigation is complete with no content to render. This fix exists on 7.x and master but was never ported to 8.x — the file was recreated from the pre-fix version.

Without the explicit 204 response:

  1. Laravel returns an implicit 200 with empty body
  2. WebDriver waits for document readyState, favicon loads, etc.
  3. Subsequent browser actions may execute before auth session is fully established
  4. Results in intermittent loginAs() failures in CI

Test plan

🤖 Generated with Claude Code

The fix from PR #1061 (076865d) returned 204 No Content from
login() and logout() to signal navigation completion to WebDriver.
This was present on 7.x but lost during the 8.x branch creation,
causing intermittent loginAs() failures (#1152) and favicon 404s.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@JoshSalway

This comment was marked as spam.

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.

1 participant