Skip to content

πŸ› Bug Report: Console /join shows an endless spinner for invited users who are not signed inΒ #14611

Closed

Description

@JoshiJoshiJoshi

πŸ‘Ÿ Reproduction steps

  1. Self-hosted Appwrite 2.5.0 with Console image appwrite/new:1.2.74-self-hosted.
  2. Organization β†’ Members β†’ Invite a new email address.
  3. Open the invite link (/join?membershipId=…&userId=…&secret=…&teamId=…) in a private window, i.e. not signed in.

πŸ‘ Expected behavior

The "Accept invitation" screen is shown and the invite can be accepted, as in 1.1.107-self-hosted (fix for #13724).

πŸ‘Ž Actual Behavior

A spinner is shown indefinitely. GET /v1/account returns 401 once, no further requests are made, and there is no error in the browser console. Users who are already signed in are not affected.

Cause: a render loop on the invite screen.

  1. For a guest, the account query ends with 401, useAuth().isLoading becomes false, and the screen switches from loading to accept.
  2. The accept screen renders AuthFlowAccountSwitcher, which calls useAuth() again.
  3. The new observer refetches the failed query on mount, because retryOnMount defaults to true in consoleAccountQueryOptions() (src/lib/react-query/hooks/auth.ts).
  4. The screen returns to loading, the switcher unmounts, the cached 401 is replayed, and the cycle repeats.

Adding retryOnMount: false to consoleAccountQueryOptions() fixes it. With this change applied to 1.2.74-self-hosted, the invite is accepted normally, and sign-in and the organization pages keep working.

Console image Guest on /join
1.1.107-self-hosted works
1.1.159-self-hosted endless spinner
1.2.74-self-hosted endless spinner

🎲 Appwrite version

Different version (specify in environment)

πŸ’» Operating system

Linux

🧱 Your Environment

Appwrite 2.5.0 (also reproduced with 2.3.0), self-hosted with Docker Compose, Console appwrite/new:1.2.74-self-hosted. Reproduced on a fresh installation without modifications.

πŸ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

Related: #13724

🏒 Have you read the Code of Conduct?

Activity

  1. added
    product / auth
    product / console
    product / databases
    product / messaging
    product / self-hosted
    product / sites
    product / storage
    on Oct 16, 2026
  2. VishalDipake commented on Oct 17, 2026

    @VishalDipake

    Hi! I'd like to work on this issue.

    From the description, it looks like the repeated loading may be caused by the failed auth query being retried when the account switcher mounts. I'll investigate consoleAccountQueryOptions() and the related auth flow, then test a fix to ensure invited users can accept invitations without signing in first.

    Please let me know if there's any additional context or a preferred approach I should follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    product / authproduct / consoleproduct / databasesproduct / messagingproduct / self-hostedproduct / sitesproduct / storage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions