Skip to content

Fix Admin MCP OAuth guest 500 (Route [login] not defined) - #513

Merged
shanerbaner82 merged 1 commit into
mainfrom
fix/admin-mcp-oauth-login
Sep 11, 2026
Merged

shanerbaner82 merged 1 commit into
mainfrom
fix/admin-mcp-oauth-login

Conversation

@shanerbaner82

Copy link
Copy Markdown
Contributor

Summary

  • Override Handler::unauthenticated so OAuth guests redirect to Filament admin login (JSON still 401; other web guests keep customer.login)
  • Register Route::redirect('/oauth/login', '/admin/login')->name('login') so route('login') resolves without stealing /login
  • Feature test: guest /oauth/authorize redirects to /admin/login instead of 500

Test plan

  • php artisan test --filter=AdminMcpOAuthTest (12 passed)
  • pint --dirty

Passport guests hit AuthenticationException; Laravel fell back to
route('login') which was undefined. Send oauth/* to Filament admin
login, keep customer.login elsewhere, and name /oauth/login as login.
@shanerbaner82
shanerbaner82 merged commit 0202dc0 into main Sep 11, 2026
2 checks passed
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