danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
17.99k stars 3k forks source link

[Bug]: Bad error message for email during verification #3903

Closed michnovka closed 1 month ago

michnovka commented 1 month ago

What happened?

When I try to sign up user, I get an error There was an error attempting to register your account. Please try again. Something went wrong

Steps to Reproduce

  1. enable ALLOW_REGISTRATION=true in .env
  2. go to /register URL
  3. enter all fields
  4. click on Continue

this is my .env for registration values:


ALLOW_EMAIL_LOGIN=true
ALLOW_REGISTRATION=true
ALLOW_SOCIAL_LOGIN=false
ALLOW_SOCIAL_REGISTRATION=false
ALLOW_PASSWORD_RESET=false
# ALLOW_ACCOUNT_DELETION=true # note: enabled by default if omitted/commented out
ALLOW_UNVERIFIED_EMAIL_LOGIN=true

What browsers are you seeing the problem on?

No response

Relevant log output

LibreChat         | 2024-09-02 19:27:40 error: [registerUser] Error in registering user: self-signed certificate in certificate chain
LibreChat         | 2024-09-02 19:27:40 warn: [registerUser] [Email: XXXX@XXX.XXX] [Temporary User deleted: {"deletedCount":1,"message":"User was deleted successfully."}]

Screenshots

No response

Code of Conduct

michnovka commented 1 month ago

After some investigation, I found it was self signed cert in email:


EMAIL_HOST=10.0.0.1
EMAIL_PORT=25
EMAIL_ENCRYPTION=
EMAIL_ENCRYPTION_HOSTNAME=
EMAIL_ALLOW_SELFSIGNED=1

and should have been

EMAIL_ALLOW_SELFSIGNED=true

Thus the cert was not recognized. The error message should make it clear it is about e-mail, as it was confusing and first I thought it has to do with website https cert