Replies: 2 comments
-
|
Hi @navi-! I'm Dosu and I’m helping the dify team. Recommended approach: Provider selection & credential management: State management for OTP: Existing patterns to reference:
Summary: To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
The recommended approach is to implement each verification provider (Plivo, Twilio, Vonage, etc.) as a separate plugin with a shared interface and credential schema. This plugin-per-provider model is Dify's current best practice for third-party integrations, making it easy to add new providers and keeping the core codebase maintainable and secure. Plugins can define credential schemas in their manifest and support credential selection via the workflow UI, with recent enhancements allowing workflow-level credential overrides and dropdown selectors for available credentials [source]. For OTP/session state management, persist session IDs, OTP tokens, or verification status in the workflow node's For reference patterns, look at the model provider factory and base class for extensible, plugin-based integrations, the datasource provider base class for credential validation and abstraction, and the HumanInputNode for multi-step, stateful workflow nodes that pause and resume execution based on user input [source]. This architecture aligns with Dify’s extensibility and maintainability goals and is the recommended path for phone verification workflows with multi-provider support. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I'm looking to add phone verification capabilities to the workflow builder that can support multiple verification providers (Plivo, Twilio Verify, Vonage, etc.). This would allow Dify app developers to verify their end-users/customers within AI workflows.
Use Case
Enable workflow builders to:
Example workflow:
Proposed Approaches
Option A: Extensible Verify Tool Category
Create a verify tool category with provider implementations (similar to how model providers work):
This allows:
Option B: Plugin per Provider
Create separate plugins for each verification provider:
Option C: Custom Workflow Node
Create a dedicated verification node type with provider selection:
Questions
Which approach is recommended for extensible third-party verification services?
State management: OTP verification requires storing a session ID between "send" and "verify" steps. What's the recommended way to handle this in workflows?
Builtin vs Plugin: For verification provider integrations, is the preference to keep these as external plugins or include as builtin tools with a common interface?
Any existing patterns for multi-step verification flows in workflows I should reference?
Would appreciate guidance before implementing. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions