dify - ✅(Solved) Fix Unable to configure the addition of 'OAuth' for Notion data source [1 pull requests, 3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35717Fetched 2026-05-01 05:53:34
View on GitHub
Comments
3
Participants
3
Timeline
8
Reactions
1
Assignees
Timeline (top)
commented ×3labeled ×2assigned ×1closed ×1

Root Cause

Unable to configure OAuth (because when a pop-up window appears, clicking anywhere in the pop-up window will cause it to disappear), unable to input key and other information

Fix Action

Fixed

PR fix notes

PR #35731: fix: datasource oauth settings can't input

Description (problem / solution / changelog)

[!IMPORTANT]

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

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. --> <!-- If this PR was created by an automated agent, add `From <Tool Name>` as the final line of the description. Example: `From Codex`. -->

fix https://github.com/langgenius/dify/issues/35717

The datasource configure menu renders AddOAuthButton inside a Popover. The OAuth client settings modal is rendered through a Dialog portal, so clicks inside the modal form can be interpreted by the parent Popover as outside interactions. When the Popover closes, it unmounts AddOAuthButton and drops the modal open state, causing the OAuth settings dialog to disappear.

This change lets AddOAuthButton notify its parent when the OAuth settings dialog is open, and the datasource Configure Popover ignores close requests while that dialog is active. This keeps the modal stable without changing the existing component structure.

Screenshots

BeforeAfter
......

Checklist

  • This change requires a documentation update, included: Dify Document
  • 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 make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

Changed files

  • web/app/components/header/account-setting/data-source-page-new/configure.tsx (modified, +9/-1)
  • web/app/components/plugins/plugin-auth/authorize/add-oauth-button.tsx (modified, +10/-4)
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.14.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Enter DIfy, click on the Knowledge Base, select Synchronize from Notion content, click on Configure Notion, click on Configure again, a selection will pop up. The first one is OAuth, the second one is API_KEY, and the second one can be configured. However, after clicking on the first one to configure OAuth, a configuration pop-up window will pop up. After clicking on the input box with the mouse, this pop-up window will disappear directly and OAuth cannot be configured (at the same time, after verification, when the pop-up window pops up, click on any position of the pop-up window, and the pop-up window will disappear directly)

<img width="1223" height="848" alt="Image" src="https://github.com/user-attachments/assets/95732197-ac7b-4071-b764-a0b5543e1a26" />

✔️ Expected Behavior

I hope to be able to configure OAuth normally

❌ Actual Behavior

Unable to configure OAuth (because when a pop-up window appears, clicking anywhere in the pop-up window will cause it to disappear), unable to input key and other information

extent analysis

TL;DR

The issue can be mitigated by investigating the JavaScript code responsible for handling the OAuth configuration pop-up window, focusing on event listeners that might be causing the window to disappear prematurely.

Guidance

  • Review the JavaScript code for the OAuth configuration pop-up window to identify any event listeners that might be causing the window to close when clicked.
  • Inspect the HTML structure of the pop-up window to ensure there are no elements that could be intercepting clicks and triggering the window's closure.
  • Use the browser's developer tools to debug the issue, setting breakpoints on event listeners attached to the pop-up window and its contents to understand the sequence of events leading to its disappearance.
  • Consider adding a temporary workaround, such as a delay or a specific click handler, to prevent the immediate closure of the pop-up window, allowing for further debugging.

Example

No specific code example can be provided without access to the actual codebase, but the debugging approach would involve isolating the event listeners and handlers associated with the pop-up window.

Notes

The exact cause of the issue cannot be determined without access to the code. The suggestions provided are based on common issues that could lead to similar behavior.

Recommendation

Apply workaround: Implement a temporary fix to prevent the pop-up window from closing immediately, allowing users to configure OAuth while the root cause is investigated and addressed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - ✅(Solved) Fix Unable to configure the addition of 'OAuth' for Notion data source [1 pull requests, 3 comments, 3 participants]