Email Login Not Working: PIN Code Not Sent #7443

Closed
opened 2026-02-21 18:20:37 -05:00 by yindo · 2 comments
Owner

Originally created by @fmobeireek on GitHub (Dec 29, 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.14.2

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Navigate to the cloud version of Dify (https://cloud.dify.ai/).
  2. Click on the "Login" button.
  3. Enter a valid email address and submit.
  4. Check the associated email inbox for the PIN code.

✔️ Expected Behavior

A PIN code should be sent to the email address provided, allowing users to log in.

Actual Behavior

No PIN code is received in the email inbox (including spam/junk folders), preventing login.

Originally created by @fmobeireek on GitHub (Dec 29, 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.14.2 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. Navigate to the cloud version of Dify (https://cloud.dify.ai/). 2. Click on the "Login" button. 3. Enter a valid email address and submit. 4. Check the associated email inbox for the PIN code. ### ✔️ Expected Behavior A PIN code should be sent to the email address provided, allowing users to log in. ### ❌ Actual Behavior No PIN code is received in the email inbox (including spam/junk folders), preventing login.
yindo added the 🐞 bugcloud labels 2026-02-21 18:20:37 -05:00
yindo closed this issue 2026-02-21 18:20:37 -05:00
Author
Owner

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

@fmobeireek Hello! I'm here to help you with any issues you encounter while using Dify. I can assist with bug reports, answer questions, and guide you on how to contribute.

To address the issue of the PIN code not being sent during the email login process, you can check the following:

  1. Email Configuration: Ensure that the email service is correctly configured in the .env file. Verify that parameters such as MAIL_TYPE, MAIL_DEFAULT_SEND_FROM, SMTP_SERVER, SMTP_PORT, SMTP_USERNAME, and SMTP_PASSWORD are set correctly if using SMTP. If using the Resend service, ensure RESEND_API_KEY and RESEND_API_URL are configured [1].

  2. Error Logging: Check the logs for any errors related to email sending. The codebase logs exceptions during the email sending process, which can help identify issues such as SMTP errors or timeouts [2][3].

  3. Rate Limiting: Ensure that the email address is not being rate-limited. The function send_email_code_login_email includes a rate limiter that could prevent emails from being sent if the limit is exceeded [4].

  4. Retry Mechanism: Verify if the retry mechanism is enabled for the email sending process. This can help in cases where the initial attempt fails [5][6].

  5. Email Validation: Confirm that the email address is valid and correctly formatted. The system uses a regular expression to validate email addresses before sending the PIN code [7].

By checking these areas, you should be able to identify and resolve the issue with the PIN code not being sent.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 29, 2024): <!-- Greeting --> @fmobeireek Hello! I'm here to help you with any issues you encounter while using Dify. I can assist with bug reports, answer questions, and guide you on how to contribute. <!-- Answer --> To address the issue of the PIN code not being sent during the email login process, you can check the following: 1. **Email Configuration**: Ensure that the email service is correctly configured in the `.env` file. Verify that parameters such as `MAIL_TYPE`, `MAIL_DEFAULT_SEND_FROM`, `SMTP_SERVER`, `SMTP_PORT`, `SMTP_USERNAME`, and `SMTP_PASSWORD` are set correctly if using SMTP. If using the Resend service, ensure `RESEND_API_KEY` and `RESEND_API_URL` are configured <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/faqs.md)</sup>. 2. **Error Logging**: Check the logs for any errors related to email sending. The codebase logs exceptions during the email sending process, which can help identify issues such as SMTP errors or timeouts <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/email/tools/send.py)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/libs/smtp.py)</sup>. 3. **Rate Limiting**: Ensure that the email address is not being rate-limited. The function `send_email_code_login_email` includes a rate limiter that could prevent emails from being sent if the limit is exceeded <sup>[[4]](https://github.com/langgenius/dify/blob/main/api/services/account_service.py)</sup>. 4. **Retry Mechanism**: Verify if the retry mechanism is enabled for the email sending process. This can help in cases where the initial attempt fails <sup>[[5]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/code.md)</sup><sup>[[6]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/error-handling/README.md)</sup>. 5. **Email Validation**: Confirm that the email address is valid and correctly formatted. The system uses a regular expression to validate email addresses before sending the PIN code <sup>[[7]](https://github.com/langgenius/dify/blob/main/web/app/signin/components/mail-and-code-auth.tsx)</sup>. By checking these areas, you should be able to identify and resolve the issue with the PIN code not being sent. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/c0b1eb1e-101a-4bdc-8774-beda62d8decf?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/c0b1eb1e-101a-4bdc-8774-beda62d8decf?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/c0b1eb1e-101a-4bdc-8774-beda62d8decf?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/c0b1eb1e-101a-4bdc-8774-beda62d8decf?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c0b1eb1e-101a-4bdc-8774-beda62d8decf?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/c0b1eb1e-101a-4bdc-8774-beda62d8decf?feedback_type=other)</sup>
Author
Owner

@douxc commented on GitHub (Dec 30, 2024):

@fmobeireek it seems the issue was caused by a network problem, but it should be working fine now. Please try again.

@douxc commented on GitHub (Dec 30, 2024): @fmobeireek it seems the issue was caused by a network problem, but it should be working fine now. Please try again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7443