OTP Codes Not Sent in Cloud #7033

Closed
opened 2026-02-21 18:18:32 -05:00 by yindo · 7 comments
Owner

Originally created by @nfaganelly on GitHub (Dec 3, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.13.0

Cloud or Self Hosted

Cloud

Steps to reproduce

When attempting to log in to the Dify.ai platform using the passwordless login method, the OTP (One-Time Password) codes are not being sent to the registered email address. This issue prevents users from accessing their accounts, causing inconvenience and making the platform unusable.

Go to the Dify.ai login page.
Enter the registered email address.
Click the button to receive the OTP code.
Check the email inbox and spam/junk folder.

✔️ Expected Behavior

An email containing the OTP code should be received to complete the login process.

Actual Behavior

No email with the OTP code is received, making it impossible to log in to the platform.

Originally created by @nfaganelly on GitHub (Dec 3, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.13.0 ### Cloud or Self Hosted Cloud ### Steps to reproduce When attempting to log in to the Dify.ai platform using the passwordless login method, the OTP (One-Time Password) codes are not being sent to the registered email address. This issue prevents users from accessing their accounts, causing inconvenience and making the platform unusable. Go to the Dify.ai login page. Enter the registered email address. Click the button to receive the OTP code. Check the email inbox and spam/junk folder. ### ✔️ Expected Behavior An email containing the OTP code should be received to complete the login process. ### ❌ Actual Behavior No email with the OTP code is received, making it impossible to log in to the platform.
yindo added the 🐞 bugcloud labels 2026-02-21 18:18:32 -05:00
yindo closed this issue 2026-02-21 18:18:32 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 3, 2024):

The issue of OTP codes not being sent in the cloud version of Dify could be related to several factors. Here are some steps and considerations to help troubleshoot and potentially resolve the problem:

  1. Check Email Service Configuration: Ensure that the email service (Resend API or SMTP) is correctly configured. Verify that the MAIL_TYPE is set appropriately, and all necessary credentials and settings (like API keys for Resend or server details for SMTP) are correctly entered [1].

  2. Review Error Logs: Check the logs for any errors related to email sending. The SMTPClient class logs exceptions, which can provide insights into what might be going wrong during the email sending process [2].

  3. Rate Limits: Ensure that the rate limits for sending emails are not being exceeded. The configuration might have limits on the number of emails that can be sent from a single IP address per minute [3].

  4. Error Handling: Review the error handling mechanisms in place for the OTP email sending process. There might be specific errors like EmailSendIpLimitError or AccountNotFound that could be affecting the email delivery [4].

  5. Fallback Mechanism: Check if there is a fallback mechanism in place if the primary email service fails. If not, consider implementing one to ensure reliability.

By addressing these areas, you may be able to identify and resolve the issue with OTP emails not being sent. If the problem persists, further investigation into the specific configurations and logs will be necessary.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Dec 3, 2024): <!-- Answer --> The issue of OTP codes not being sent in the cloud version of Dify could be related to several factors. Here are some steps and considerations to help troubleshoot and potentially resolve the problem: 1. **Check Email Service Configuration**: Ensure that the email service (Resend API or SMTP) is correctly configured. Verify that the `MAIL_TYPE` is set appropriately, and all necessary credentials and settings (like API keys for Resend or server details for SMTP) are correctly entered <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/extensions/ext_mail.py)</sup>. 2. **Review Error Logs**: Check the logs for any errors related to email sending. The `SMTPClient` class logs exceptions, which can provide insights into what might be going wrong during the email sending process <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/libs/smtp.py)</sup>. 3. **Rate Limits**: Ensure that the rate limits for sending emails are not being exceeded. The configuration might have limits on the number of emails that can be sent from a single IP address per minute <sup>[[3]](https://github.com/langgenius/dify/blob/main/api/configs/feature/__init__.py)</sup>. 4. **Error Handling**: Review the error handling mechanisms in place for the OTP email sending process. There might be specific errors like `EmailSendIpLimitError` or `AccountNotFound` that could be affecting the email delivery <sup>[[4]](https://github.com/langgenius/dify/blob/main/api/controllers/console/auth/forgot_password.py)</sup>. 5. **Fallback Mechanism**: Check if there is a fallback mechanism in place if the primary email service fails. If not, consider implementing one to ensure reliability. By addressing these areas, you may be able to identify and resolve the issue with OTP emails not being sent. If the problem persists, further investigation into the specific configurations and logs will be necessary. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@nfaganelly commented on GitHub (Dec 3, 2024):

none of these steps are valid for cloud service

@nfaganelly commented on GitHub (Dec 3, 2024): none of these steps are valid for cloud service
Author
Owner

@nfaganelly commented on GitHub (Dec 3, 2024):

image

Is there anything I can do to resolve this soon? This is a serious issue.

@nfaganelly commented on GitHub (Dec 3, 2024): ![image](https://github.com/user-attachments/assets/6755b8c6-13e7-4f37-bd93-ac11292bd9b0) Is there anything I can do to resolve this soon? This is a serious issue.
Author
Owner

@dosubot[bot] commented on GitHub (Dec 3, 2024):

To address the issue of OTP emails not being sent in the cloud version of Dify, you can check the following:

  1. Resend API Configuration: Ensure that the RESEND_API_KEY is correctly set up. This is crucial for the email service to function properly [1].

  2. Sender Email: Verify that the MAIL_DEFAULT_SEND_FROM is configured correctly. This is the email address from which the OTP emails are sent [1].

  3. API Connectivity: Check if there are any connectivity issues with the Resend API. Ensure that the RESEND_API_URL is accessible and correctly configured if you have customized it [1].

If these configurations are correct and the issue persists, it might be necessary to look into any potential service disruptions with the Resend provider or consider reaching out to their support for further assistance.

This is a tough nut to crack, could really use your help on this, @takatost.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Dec 3, 2024): <!-- Answer --> To address the issue of OTP emails not being sent in the cloud version of Dify, you can check the following: 1. **Resend API Configuration**: Ensure that the `RESEND_API_KEY` is correctly set up. This is crucial for the email service to function properly <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/getting-started/install-self-hosted/environments.md)</sup>. 2. **Sender Email**: Verify that the `MAIL_DEFAULT_SEND_FROM` is configured correctly. This is the email address from which the OTP emails are sent <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/getting-started/install-self-hosted/environments.md)</sup>. 3. **API Connectivity**: Check if there are any connectivity issues with the Resend API. Ensure that the `RESEND_API_URL` is accessible and correctly configured if you have customized it <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/getting-started/install-self-hosted/environments.md)</sup>. If these configurations are correct and the issue persists, it might be necessary to look into any potential service disruptions with the Resend provider or consider reaching out to their support for further assistance. This is a tough nut to crack, could really use your help on this, @takatost. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Dec 3, 2024):

Please send an email to support@dify.ai to report this incident.

@crazywoola commented on GitHub (Dec 3, 2024): Please send an email to support@dify.ai to report this incident.
Author
Owner

@crazywoola commented on GitHub (Dec 4, 2024):

This should been resolved now :)

@crazywoola commented on GitHub (Dec 4, 2024): This should been resolved now :)
Author
Owner

@flly-cliente-marketshop commented on GitHub (Dec 4, 2024):

Thanks!

@flly-cliente-marketshop commented on GitHub (Dec 4, 2024): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7033