khoj-ai / khoj

Your AI second brain. Get answers to your questions, whether they be online or in your own notes. Use online AI models (e.g gpt4) or private, local LLMs (e.g llama3). Self-host locally or use our cloud instance. Access from Obsidian, Emacs, Desktop app, Web or Whatsapp.
https://khoj.dev
GNU Affero General Public License v3.0
12.63k stars 640 forks source link

[FIX] Unable to logout user #772

Closed Varming73 closed 3 months ago

Varming73 commented 3 months ago

I've installed khoj via the docker compose on an Ubuntu server. When I try to logout the default user (I've created a different user in the admin side) I get this error:

{"detail":"Not Found"}

To Reproduce

Steps to reproduce the behavior:

Screenshots

image

Platform

If self-hosted

Varming73 commented 3 months ago

I guess the problem must be that I run as --anonymous-mode but the documentation doesn't describe how to set it up to run in any other way. It just mentions that you have to set up Google auth but not how to do it. Any useful links or anything?

maciekpoplawski commented 3 months ago

I wold like to also 👍 on this issue. It would be nice to be able to use multiple users without the need for google auth. I've also created users in Django Admin but im unable to use them cause im unable to logout.

sabaimran commented 3 months ago

Hey folks, valid feedback. We hadn't had much demand for multiple users in the self-hosted instance yet, so we held off on implementing custom auth. Currently, the only two options for auth are either anonymous-mode (i.e., no auth) and Google auth (documentation for that is here).

I hear you, there should be a way to create multiple users without having to go through all that drama. We'll prioritize some changes to make that work, but for now I'd recommend setting up the Google login if you're using the python package.

sabaimran commented 3 months ago

Closed with #820

sabaimran commented 3 months ago

Hey y'all! This is now possible, to have signed-in, authenticated users without --anonymous-mode. I've added the documentation here: https://docs.khoj.dev/miscellaneous/authentication.

The change will go out in the next release! Probably in a week or so. Otherwise, you can use the pre-release build to test it out.