Skip to content

feat: Make react hook and widge MiniKit compatible#173

Draft
Takaros999 wants to merge 1 commit intomainfrom
takis/make-widget-minikit-compatible
Draft

feat: Make react hook and widge MiniKit compatible#173
Takaros999 wants to merge 1 commit intomainfrom
takis/make-widget-minikit-compatible

Conversation

@Takaros999
Copy link
Contributor

@Takaros999 Takaros999 commented Mar 13, 2026

Seamless DevEx to migrate from Minikit to IDKit, plug and play the widget or hook:

Hook usage:

  const { open, result, isInWorldApp, connectorURI } = useIDKitRequest({
    app_id: "app_xxx",               
    action: "verify",  
    // ... 
  });

  // connectorURI is null in World App (no QR needed)
  // isInWorldApp is true when running inside World App

Widget usage:

  // Works in both contexts with zero config changes
  <IDKitRequestWidget
    open={open}
    onOpenChange={setOpen}
    handleVerify={(result) => { /* called in both contexts */ }}
    onSuccess={(result) => { /* called in both contexts */ }}
    onError={(code) => { /* called in both contexts */ }}
    {...config}
  />

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
idkit-js-example Ready Ready Preview, Comment Mar 13, 2026 5:08am

Request Review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e47735f63

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +116 to +119
if (isSuccess) {
if (flow.isInWorldApp) {
onOpenChange(false);
} else if (autoClose) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Close World App widget on terminal errors

In World App mode this component later returns null, so there is no error/retry UI, but this auto-close effect only handles isSuccess. When verification fails or is cancelled (flow.isError or host verification rejection), onOpenChange(false) is never called and open can remain stuck at true, which prevents callers that reopen with setOpen(true) from starting a new flow. This makes failed World App verifications non-recoverable unless integrators add custom close logic in onError.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant