Bug in Invitation Email Login Link #7581

Closed
opened 2026-02-21 18:21:19 -05:00 by yindo · 4 comments
Owner

Originally created by @lukefan on GitHub (Jan 8, 2025).

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.15.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When inviting new users, there is an issue with the login button in the received email. Upon clicking the login button, the redirected link is missing the domain name. The link appears as "http:///activate?token=[login token]", where the part where the domain name should be written has been omitted and the token details have been concealed for security reasons. This makes it impossible for users to correctly access the activation page and log in. It's crucial to fix this as it severely impacts the user onboarding process.

✔️ Expected Behavior

The login link in the invitation email should contain the correct and complete domain name, so that when clicked, it redirects the user to the appropriate activation and login page smoothly.

Actual Behavior

No response

Originally created by @lukefan on GitHub (Jan 8, 2025). ### 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.15.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When inviting new users, there is an issue with the login button in the received email. Upon clicking the login button, the redirected link is missing the domain name. The link appears as "http:///activate?token=[login token]", where the part where the domain name should be written has been omitted and the token details have been concealed for security reasons. This makes it impossible for users to correctly access the activation page and log in. It's crucial to fix this as it severely impacts the user onboarding process. ### ✔️ Expected Behavior The login link in the invitation email should contain the correct and complete domain name, so that when clicked, it redirects the user to the appropriate activation and login page smoothly. ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:21:19 -05:00
yindo closed this issue 2026-02-21 18:21:19 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 8, 2025):

The issue you're experiencing with the invitation email login link missing the domain name might be related to the configuration of environment variables in your self-hosted Dify instance. Specifically, the environment variables that define the URLs for different components of the application might not be set correctly.

To resolve this, ensure that the following environment variables are properly configured with the correct domain names:

  • CONSOLE_API_URL: The backend URL for the console API.
  • CONSOLE_WEB_URL: The front-end URL of the console web interface.
  • SERVICE_API_URL: The Service API URL.
  • APP_API_URL: The WebApp API backend URL.
  • APP_WEB_URL: The WebApp URL.

These variables should be set to the appropriate URLs for your deployment. If they are left empty, the application defaults to using the same domain, which might be causing the issue if the domain is not correctly set in your environment [1].

Check your environment configuration and update these variables as needed to ensure the domain name is included in the generated links.

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 (Jan 8, 2025): <!-- Answer --> The issue you're experiencing with the invitation email login link missing the domain name might be related to the configuration of environment variables in your self-hosted Dify instance. Specifically, the environment variables that define the URLs for different components of the application might not be set correctly. To resolve this, ensure that the following environment variables are properly configured with the correct domain names: - `CONSOLE_API_URL`: The backend URL for the console API. - `CONSOLE_WEB_URL`: The front-end URL of the console web interface. - `SERVICE_API_URL`: The Service API URL. - `APP_API_URL`: The WebApp API backend URL. - `APP_WEB_URL`: The WebApp URL. These variables should be set to the appropriate URLs for your deployment. If they are left empty, the application defaults to using the same domain, which might be causing the issue if the domain is not correctly set in your environment <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/environments.md)</sup>. Check your environment configuration and update these variables as needed to ensure the domain name is included in the generated links. <!-- 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/ef308bb7-5e95-4f64-9916-a9ee6f6890fa?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ef308bb7-5e95-4f64-9916-a9ee6f6890fa?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ef308bb7-5e95-4f64-9916-a9ee6f6890fa?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ef308bb7-5e95-4f64-9916-a9ee6f6890fa?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ef308bb7-5e95-4f64-9916-a9ee6f6890fa?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/ef308bb7-5e95-4f64-9916-a9ee6f6890fa?feedback_type=other)</sup>
Author
Owner

@lukefan commented on GitHub (Jan 8, 2025):

thx, I'll try later.

@lukefan commented on GitHub (Jan 8, 2025): thx, I'll try later.
Author
Owner

@crazywoola commented on GitHub (Jan 8, 2025):

According to https://github.com/langgenius/dify/blob/56e15d09a9e94de963dd5fc38c7455a7aaee99f3/api/tasks/mail_invite_member_task.py#L34

You are missing CONSOLE_WEB_URL.

@crazywoola commented on GitHub (Jan 8, 2025): According to https://github.com/langgenius/dify/blob/56e15d09a9e94de963dd5fc38c7455a7aaee99f3/api/tasks/mail_invite_member_task.py#L34 You are missing `CONSOLE_WEB_URL`.
Author
Owner

@sukai-cheng commented on GitHub (Feb 17, 2025):

i write, but the url is mailmaster://static.dashi.163.com/activate?token=... , pls help me
Image

@sukai-cheng commented on GitHub (Feb 17, 2025): i write, but the url is mailmaster://static.dashi.163.com/activate?token=... , pls help me <img width="1434" alt="Image" src="https://github.com/user-attachments/assets/b7d6e87a-9629-4ff4-a27c-2d6cf54a87ef" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7581