Skip to content

[BUG][UI]: Redirect manually accessed admin/logout to admin/login page #3555

@msureshkumar88

Description

@msureshkumar88

🐞 Bug Summary

Briefly describe the issue or unexpected behavior.

When manually navigating to admin/logout, the user should be automatically redirected to the admin/login page instead of remaining on the logout endpoint or seeing an unexpected response. This ensures a proper logout flow and provides a clear path for the user to log in again.

Image

Note:
The admin/logout route can currently be accessed both with and without an active login session. If the user is already logged out, the admin/logout page should not be accessible. Instead, the user should be immediately redirected to the admin/login page.


🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

🔁 Steps to Reproduce

  1. Manually enter admin/logout into browser
  2. Page will clear and show 'Logged out' message

🤔 Expected Behavior

What should have happened instead?

Page should be redirected to admin/login


📓 Logs / Error Output

Paste any relevant stack traces or logs here.
⚠️ Do not paste secrets, credentials, or tokens.


🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit 1.0.0-RC2
Runtime Python 3.12
Platform / OS e.g. Ubuntu 22.04
Container none

🧩 Additional Context (optional)

Add any configuration details, flags, or related issues.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageIssues / Features awaiting triageuiUser Interface

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions