Unable to Log in to Sourcegraph – Getting 401 Error After Logout

Hi everyone,

I’m currently encountering an issue with Sourcegraph where I suddenly can no longer log in. When I open the browser console, I see the following error message (screenshot attached).

Some additional context:

  • All k3s nodes appear to be in a healthy state.
  • I’ve already tried renewing the k3s certificates and restarting the services, but it didn’t resolve the problem.
  • Interestingly, I can still use Sourcegraph normally if I don’t log out — my browser has saved login information that works fine.
  • However, once I log out and try to log back in, I immediately get a 401 Unauthorized error.

Has anyone experienced something similar or have any suggestions on what might be causing this?

message:401 Unauthorized Private mode requires authentication.

I found that the 401 error only occurs with the content under GraphQL. It used to work fine because there was a cookie.

Hey @shao
Thank you for reporting this issue.

Does it resolve the issue after deleting the cookies for that site?