langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.8k stars 7.51k forks source link

Unable to log in with a local email account. #7065

Closed qiuqi closed 3 months ago

qiuqi commented 3 months ago

Self Checks

Dify version

0.6.16

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

After the local deployment is completed, the login interface only allows logging in through GitHub or Gmail, and the option to log in using your own email account is no longer available

✔️ Expected Behavior

The previous version supported logging in with a local email account.

❌ Actual Behavior

After the upgrade, there is no place for the previous accounts to log in.

dosubot[bot] commented 3 months ago

@qiuqi Hello there! I'm here to help you with any bugs, questions, or becoming a contributor. While you're waiting for a human maintainer, feel free to ask me anything.

The inability to log in with a local email account after upgrading to Dify version 0.6.16 in your self-hosted deployment may be due to cross-domain issues between the front-end and server-side. This can happen if the domain name or website has been switched, causing cross-domain problems.

To restore this functionality, you need to update the CORS cross-domain configuration in your docker-compose.yml file. Ensure that the following configuration items are set to the new domain name:

CONSOLE_API_URL: <new_backend_url>
CONSOLE_WEB_URL: <new_frontend_url>
SERVICE_API_URL: <new_service_api_url>
APP_API_URL: <new_webapp_api_backend_url>
APP_WEB_URL: <new_webapp_url>

Make sure to replace <new_backend_url>, <new_frontend_url>, <new_service_api_url>, <new_webapp_api_backend_url>, and <new_webapp_url> with the appropriate URLs for your deployment [1].

Additionally, you need to handle email sending for password reset functionality. Configure the MAILCHIMP_TRANSACTIONAL_API_KEY in your application settings and implement the email sending logic. You can also configure mail-related settings in your environment variables, depending on your email provider, using either resend or smtp for sending emails [2][3].

To continue talking to Dosu, mention @dosu.

crazywoola commented 3 months ago

Check this line https://github.com/langgenius/dify/blob/8bca908f1571bca85860425c7b3b4b314315d666/web/.env.example#L4

qiuqi commented 3 months ago

NEXT_PUBLIC_EDITION=SELF_HOSTED

resolved with this change.