[GH-ISSUE #6329] Sign Out Button Keeps Loading, No Action Taken #19116

Closed
opened 2026-04-15 17:54:30 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @console-aayush on GitHub (Nov 26, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/6329

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Steps to Reproduce:

Render SessionsCard in a page with a logged-in user.
Click Sign Out for the current session.
Observe that the button keeps loading, and the user is not signed out.

Current vs. Expected behavior

Expected Behavior:
The session should be signed out, and the UI should update accordingly.

Actual Behavior:
The button keeps loading indefinitely, and no console or network errors are reported.

Image

What version of Better Auth are you using?

1.3.34

System info

@daveyplate/better-auth-ui": "^3.2.7",

Which area(s) are affected? (Select all that apply)

Client

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

When using the SessionsCard component from @daveyplate/better-auth-ui, clicking Sign Out keeps loading indefinitely. No errors appear in the console or in the Network tab.
Code Example:

import { SessionsCard } from "@daveyplate/better-auth-ui";

<SessionsCard
localization={{
SESSIONS: "Active Devices",
SESSIONS_DESCRIPTION: "Review and revoke access from active devices and sessions.",
CURRENT_SESSION: "This Device",
REVOKE: "Remove Access",
}}
/>

Originally created by @console-aayush on GitHub (Nov 26, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/6329 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce Steps to Reproduce: Render SessionsCard in a page with a logged-in user. Click Sign Out for the current session. Observe that the button keeps loading, and the user is not signed out. ### Current vs. Expected behavior Expected Behavior: The session should be signed out, and the UI should update accordingly. Actual Behavior: The button keeps loading indefinitely, and no console or network errors are reported. <img width="1880" height="969" alt="Image" src="https://github.com/user-attachments/assets/21e2191d-cf72-4862-9f54-1eb9e9f5711b" /> ### What version of Better Auth are you using? 1.3.34 ### System info ```bash @daveyplate/better-auth-ui": "^3.2.7", ``` ### Which area(s) are affected? (Select all that apply) Client ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context When using the SessionsCard component from @daveyplate/better-auth-ui, clicking Sign Out keeps loading indefinitely. No errors appear in the console or in the Network tab. Code Example: import { SessionsCard } from "@daveyplate/better-auth-ui"; <SessionsCard localization={{ SESSIONS: "Active Devices", SESSIONS_DESCRIPTION: "Review and revoke access from active devices and sessions.", CURRENT_SESSION: "This Device", REVOKE: "Remove Access", }} />
GiteaMirror added the lockedbug labels 2026-04-15 17:54:30 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 26, 2025):

Hi there, thanks for the report! It sounds like the SessionsCard’s sign out behavior isn’t completing its request. Here are a few steps you can try:

• Confirm that the backend sign out endpoint is working correctly and returning a proper response. You might test the sign out API manually or review the network panel for any stalled or pending requests. This can help pinpoint if the issue is on the client side or if the sign out isn’t reaching the backend as expected [1].

• Verify any potential configuration or proxy settings in your Better Auth setup. Sometimes if sessions aren’t cleared on the server, the UI’s loading state won’t update correctly.

• Check for any browser caching or cookie issues that might be interfering with the sign out process.

Have you tried logging the full sign out API response? Knowing whether it eventually resolves or hangs indefinitely can further narrow down the culprit.

Tag @better-auth-agent if you would like an answer from the Agent. Any additional details or error logs you can share would help us further diagnose the issue!

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3580199407 --> @better-auth-agent[bot] commented on GitHub (Nov 26, 2025): Hi there, thanks for the report! It sounds like the SessionsCard’s sign out behavior isn’t completing its request. Here are a few steps you can try: • Confirm that the backend sign out endpoint is working correctly and returning a proper response. You might test the sign out API manually or review the network panel for any stalled or pending requests. This can help pinpoint if the issue is on the client side or if the sign out isn’t reaching the backend as expected [[1]](https://github.com/better-auth/better-auth/issues/4125). • Verify any potential configuration or proxy settings in your Better Auth setup. Sometimes if sessions aren’t cleared on the server, the UI’s loading state won’t update correctly. • Check for any browser caching or cookie issues that might be interfering with the sign out process. Have you tried logging the full sign out API response? Knowing whether it eventually resolves or hangs indefinitely can further narrow down the culprit. Tag @better-auth-agent if you would like an answer from the Agent. Any additional details or error logs you can share would help us further diagnose the issue! <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@console-aayush commented on GitHub (Nov 26, 2025):

@better-auth-agent

<!-- gh-comment-id:3580204784 --> @console-aayush commented on GitHub (Nov 26, 2025): @better-auth-agent
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 26, 2025):

Hi there! Thanks for reporting the issue. Here are a few troubleshooting steps you can try:

• First, verify that the sign-out API call is indeed being sent when you click the button. Check the network tab in your browser’s developer tools to see if the request is made and what response it returns—even if no errors show in the console, a silent failure might indicate a server or routing issue.

• Next, if you’re using the SessionsCard component from the UI package, try calling auth.api.signOut manually to confirm that the backend is correctly terminating the session. This step helps isolate whether the problem is with the UI component or the underlying API.

• Also, ensure that your versions of Better Auth (v1.3.34) and the @daveyplate/better-auth-ui package (v3.2.7) are fully compatible. Sometimes UI components may expect a particular behavior from the API that might have changed between versions.

• Lastly, check if any recent changes in your auth config or middleware might be affecting the sign-out process. Even if no errors are visible, a misconfiguration could cause the call to hang.

Does manually signing out via the API work as expected on your end, or do you see any unusual behavior in the network logs? Tag @better-auth-agent if you would like an answer from the Agent.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3580206391 --> @better-auth-agent[bot] commented on GitHub (Nov 26, 2025): Hi there! Thanks for reporting the issue. Here are a few troubleshooting steps you can try: • First, verify that the sign-out API call is indeed being sent when you click the button. Check the network tab in your browser’s developer tools to see if the request is made and what response it returns—even if no errors show in the console, a silent failure might indicate a server or routing issue. • Next, if you’re using the SessionsCard component from the UI package, try calling auth.api.signOut manually to confirm that the backend is correctly terminating the session. This step helps isolate whether the problem is with the UI component or the underlying API. • Also, ensure that your versions of Better Auth (v1.3.34) and the @daveyplate/better-auth-ui package (v3.2.7) are fully compatible. Sometimes UI components may expect a particular behavior from the API that might have changed between versions. • Lastly, check if any recent changes in your auth config or middleware might be affecting the sign-out process. Even if no errors are visible, a misconfiguration could cause the call to hang. Does manually signing out via the API work as expected on your end, or do you see any unusual behavior in the network logs? Tag @better-auth-agent if you would like an answer from the Agent. <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@dosubot[bot] commented on GitHub (Nov 26, 2025):

Hi @console-aayush! I'm Dosu and I’m helping the better-auth team.

The most likely reason the SessionsCard sign out button keeps loading with no network or console errors is that the multi-session plugin is not enabled in your Better Auth config. The SessionsCard relies on the multi-session plugin to provide the backend endpoints for revoking sessions and signing out devices. If this plugin is missing, the UI will stay in a loading state because the required API endpoint does not exist, and no network request is made see source.

To fix this, add the multi-session plugin to your Better Auth config:

import { betterAuth } from "better-auth";
import { multiSession } from "better-auth/plugins";

export const auth = betterAuth({
  emailAndPassword: { enabled: true },
  plugins: [multiSession()],
});

After updating your config, restart your server and try again. If you still see the loading state, make sure you are not mixing destructured and direct auth client methods in your code, as this can break session updates see source.

If you need to support single-session only, use a different UI component for sign out, as SessionsCard is designed for multi-session management.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

<!-- gh-comment-id:3580225441 --> @dosubot[bot] commented on GitHub (Nov 26, 2025): <!-- Greeting --> Hi @console-aayush! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> The most likely reason the SessionsCard sign out button keeps loading with no network or console errors is that the multi-session plugin is not enabled in your Better Auth config. The SessionsCard relies on the multi-session plugin to provide the backend endpoints for revoking sessions and signing out devices. If this plugin is missing, the UI will stay in a loading state because the required API endpoint does not exist, and no network request is made [see source](https://github.com/better-auth/better-auth/blob/f2c28dd4a29f9ff43e838a97b0f9ca06148d1300/packages/better-auth/src/plugins/multi-session/index.ts#L176-L356). To fix this, add the multi-session plugin to your Better Auth config: ```ts import { betterAuth } from "better-auth"; import { multiSession } from "better-auth/plugins"; export const auth = betterAuth({ emailAndPassword: { enabled: true }, plugins: [multiSession()], }); ``` After updating your config, restart your server and try again. If you still see the loading state, make sure you are not mixing destructured and direct auth client methods in your code, as this can break session updates [see source](https://github.com/better-auth/better-auth/issues/1006#issuecomment-2688906605). If you need to support single-session only, use a different UI component for sign out, as SessionsCard is designed for multi-session management. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/9a1c2289-134a-4d1e-a9d7-17fedbefbebc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9a1c2289-134a-4d1e-a9d7-17fedbefbebc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9a1c2289-134a-4d1e-a9d7-17fedbefbebc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9a1c2289-134a-4d1e-a9d7-17fedbefbebc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9a1c2289-134a-4d1e-a9d7-17fedbefbebc?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9a1c2289-134a-4d1e-a9d7-17fedbefbebc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9a1c2289-134a-4d1e-a9d7-17fedbefbebc?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20most%20likely%20reason%20the%20SessionsCard%20sign%20out%20button%20keeps%20loading%20with%20no%20network%20or%20console%20errors%20is%20that%20the%20multi-session%20plugin%20is%20not%20enabled%20in%20your%20Better%20Auth%20config.%20The%20SessionsCard%20relies%20on%20the%20multi-session%20plugin%20to%20provide%20the%20backend%20endpoints%20for%20revoking%20sessions%20and%20signing%20out%20devices.%20If%20this%20plugin%20is%20missing%2C%20the%20UI%20will%20stay%20in%20a%20loading%20state%20because%20the%20required%20API%20endpoint%20does%20not%20exist%2C%20and%20no%20network%20request%20is%20made%C2%A0%5Bsee%20source%5D%28https%3A//github.com/better-auth/better-auth/blob/f2c28dd4a29f9ff43e838a97b0f9ca06148d1300/packages/better-auth/src/plugins/multi-session/index.ts%23L176-L356%29.%0A%0ATo%20fix%20this%2C%20add%20the%20multi-session%20plugin%20to%20your%20Better%20Auth%20config%3A%0A%0A%60%60%60ts%0Aimport%20%7B%20betterAuth%20%7D%20from%20%22better-auth%22%3B%0Aimport%20%7B%20multiSession%20%7D%20from%20%22better-auth/plugins%22%3B%0A%0Aexport%20const%20auth%20%3D%20betterAuth%28%7B%0A%20%20emailAndPassword%3A%20%7B%20enabled%3A%20true%20%7D%2C%0A%20%20plugins%3A%20%5BmultiSession%28%29%5D%2C%0A%7D%29%3B%0A%60%60%60%0A%0AAfter%20updating%20your%20config%2C%20restart%20your%20server%20and%20try%20again.%20If%20you%20still%20see%20the%20loading%20state%2C%20make%20sure%20you%20are%20not%20mixing%20destructured%20and%20direct%20auth%20client%20methods%20in%20your%20code%2C%20as%20this%20can%20break%20session%20updates%C2%A0%5Bsee%20source%5D%28https%3A//github.com/better-auth/better-auth/issues/1006%23issuecomment-2688906605%29.%0A%0AIf%20you%20need%20to%20support%20single-session%20only%2C%20use%20a%20different%20UI%20component%20for%20sign%20out%2C%20as%20SessionsCard%20is%20designed%20for%20multi-session%20management.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/6329)
Author
Owner

@ping-maxwell commented on GitHub (Jan 8, 2026):

Hello this is likely an issue with Better Auth UI, please open an issue there instead.

<!-- gh-comment-id:3723988669 --> @ping-maxwell commented on GitHub (Jan 8, 2026): Hello this is likely an issue with [Better Auth UI](https://github.com/better-auth-ui/better-auth-ui), please open an issue there instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#19116