[PR #16062] feat: allow the embedding in websites to customize sys.user_id #28423

Closed
opened 2026-02-21 20:43:25 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/16062

State: closed
Merged: Yes


Summary

This PR allows the embedding in websites to customize sys.user_id. Close #13555 and Close #12384.

Screenshots

Before After
Not possible to custom user_id if we use dify embedding in websites, unless we fork and modify webapp-conversation.image Like inputs, we set sys.user_id in url and request /passport api to get the jwt included the user_id. imageThe chat flow just returns the sys.user_id.imageimage

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document https://github.com/langgenius/dify-docs/pull/631
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/16062 **State:** closed **Merged:** Yes --- # Summary <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. > [!Tip] > Close issue syntax: `Fixes #<issue number>` or `Resolves #<issue number>`, see [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more details. --> This PR allows the embedding in websites to customize `sys.user_id`. Close #13555 and Close #12384. # Screenshots | Before | After | |--------|-------| |Not possible to custom user_id if we use dify embedding in websites, unless we fork and modify webapp-conversation.<img width="1512" alt="image" src="https://github.com/user-attachments/assets/24970b98-8b37-4301-9f4b-5431696b77a8" />|Like inputs, we set `sys.user_id` in url and request `/passport` api to get the jwt included the `user_id`. <img width="1512" alt="image" src="https://github.com/user-attachments/assets/959937a1-aac7-4b90-b612-af3c2e6af058" />The chat flow just returns the `sys.user_id`.<img width="1512" alt="image" src="https://github.com/user-attachments/assets/18a19a30-377c-49b2-8931-a1350a9445e1" /><img width="1512" alt="image" src="https://github.com/user-attachments/assets/11d2adec-8a8a-480f-9e12-52c28ef5e7d0" />| # Checklist > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [x] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) https://github.com/langgenius/dify-docs/pull/631 - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:43:25 -05:00
yindo closed this issue 2026-02-21 20:43:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#28423