dotneet / smart-chatbot-ui

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

Authentication: infinite redirect while using other language than english #187

Open ghost opened 10 months ago

ghost commented 10 months ago

Hello,

the authentication while using german language leads to an infinite redirect loop:

Screenshot 2023-12-03 215400

My .env.local file:

# Chatbot UI
DEFAULT_MODEL=gpt-3.5-turbo
OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT="You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown."
OPENAI_ORGANIZATION=org-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Specify url to a json file that list available plugins.
# When specifying multiple URLs, separate them with commas.
# Example json file: `/public/plugin.js`
PLUGINS_JSON_URLS=http://localhost:3000/plugins.json
PLUGINS_INTERNAL=wikipedia_search,google_search
# To enable python interpreter, specify codeapi endpoint to `PYTHON_INTERPRETER_BACKEND` and add 'python_interpreter' to PLUGINS_INTERNAL
# codeapi server is here:
# https://github.com/dotneet/codeapi
PYTHON_INTERPRETER_BACKEND=

# for Google Plugin
GOOGLE_API_KEY=
GOOGLE_CSE_ID=

# MongoDB URI for Local
MONGODB_URI=mongodb://root:example@127.0.0.1:27017/
MONGODB_DB=chatui
# MongoDB URI for docker-compose
# MONGODB_URI=mongodb://root:example@mongo:27017/
MONGO_INITDB_ROOT_USERNAME=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MONGO_INITDB_ROOT_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# NextAuth
NEXTAUTH_ENABLED=true
NEXTAUTH_EMAIL_PATTERN=.+@example.com
NEXTAUTH_URL=https://example.com/
# must replace if you use NextAuth
NEXTAUTH_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NEXTAUTH_SESSION_MAX_AGE=86400
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
COGNITO_CLIENT_ID=
COGNITO_CLIENT_SECRET=
COGNITO_ISSUER=
AZURE_AD_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AZURE_AD_TENANT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AZURE_AD_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Audit Log
AUDIT_LOG_ENABLED=false

# For Debugging
DEBUG_AGENT_LLM_LOGGING=true