dotneet / smart-chatbot-ui

An open source ChatGPT UI.
https://smart-chatbot-ui.vercel.app/
MIT License
466 stars 100 forks source link

Even with auth disabled, smart-chatbot-ui tries to load the NEXTAUTH URL @localhost and fails to load the page #145

Open jerkstorecaller opened 10 months ago

jerkstorecaller commented 10 months ago

Like most home users I use smart-chatbot-ui behind an nginx reverse proxy and basic_auth.

My only changes from .env.local.example are setting the API key and the default model. So NEXTAUTH_ENABLED=false.

The first time I visit https://chat.mydomain.com, I get prompted for basic_auth by nginx, I enter it, the page loads....then smart-chatbot-ui tries to redirect to http://localhost:3000 (using some callback URL), which obviously doesn't load. This localhost:3000 is the URL of NEXTAUTH in the default .env.local. Then I try to access chat.mydomain.com again, and it loads fine from then on.

If I try a private/incognito browsing session, the same happens: tries to load localhost:3000 on the 1st load. Re-entering the URL makes it work.

Is there a way to completely disable this auth redirect? Other self-hosted tools tend to give you an option for that. It's a minor issue but I'd like to give some people access to my instance and this would confuse them.

Mist-Hunter commented 9 months ago

Thank you for this project!

I'm having the same issue as @jerkstorecaller. I'd love to be able to just run your service behind a reverse proxy and handle any auth or security on my own. I'm actually have trouble getting past the redirect at all I had Mongo setup wrong.

I doubt this is helpful, but here's the context of my trying to run this: I'm trying to use your project in conjunction with localai which has examples from mckaywrigley/chatbot-ui but it looks that his project (your source I think) is dead. I've looked at your project and unSAGED which both seem to be forks of the dead project, but unSAGED doesn't really seem to have a fully self-hostable model.

jerkstorecaller commented 9 months ago

@Mist-Hunter I used almost 10 of these apps and the only decent one is Librechat, so I recommend you use that. However, note you'll need to write special rules, see my ticket https://github.com/danny-avila/LibreChat/discussions/890

Mist-Hunter commented 9 months ago

@jerkstorecaller thank you! I'll be looking at that now