Skip to content

Guest auth token is incorrectly sent with user login HTTP request #404

@lihebi

Description

@lihebi

When a user is not logged in, the "guest" token will be sent with every HTTP request. Consequently, when the guest token expires (in 30 days), the user cannot log in again without manually deleting the guestToken from the browser cache.

setAuthToken(
localStorage.getItem("token") ||
localStorage.getItem("guestToken") ||
null
);

Correct behavior:

  1. Short-term fix: do not send guest tokens for user signup/logins
  2. Long-term: the guest system has many flaws, e.g., repos not merged after registration. We need a better way to handle guests, preferably local-only with IndexedDB & Yjs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1top prioritybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions