Skip to content

[BUG] Login Success but Session Cookie Not Saved (GoFiber) — Unable to Redirect to Admin Panel #671

@mstfsu

Description

@mstfsu

bug 描述 Even though a session record is successfully created in the goadmin_session table, the login flow does not set any session cookies in the browser. After submitting the login form, the page only refreshes without storing the session cookie, resulting in a successful sign-in state on the backend but no redirection to the Admin Panel. The backend confirms the login as successful; however, since the cookie is not persisted in the browser, the frontend remains in an unauthenticated state.

复现步骤

Create an admin user in goadmin_users table.

Assign a role to the newly created admin user.

Navigate to the GoAdmin login page.

Attempt to log in.

Observe that the page refreshes but the session cookie is not saved.

期望结果

After a successful sign-in request, the session cookie should be written to the browser.

The user should be automatically redirected to the Admin Panel.

Login request returns success.

A session entry is inserted into the goadmin_session table.

Browser does not receive or store any session cookie.

Page only refreshes and user remains on the login screen.

复现代码 [提供可复现的代码,仓库,或线上示例]

版本信息:

  • GoAdmin 版本: v1.2.26
  • golang 版本:1.25.1
  • 浏览器环境:Chrome
  • 开发环境:Mac, 26.0.1

其他信息 [如截图等其他信息可以贴在这里]

No errors appear in the console.

No cookie is visible in Chrome DevTools → Application → Cookies.

Backend logs show that session creation is successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions