worldcoin / idkit-js

Javascript toolkit to interact with the World ID protocol. Building the Identity SDK.
https://docs.worldcoin.org
MIT License
278 stars 68 forks source link

Feature Request: Implement IDKit.close() API for close modal on standalone #257

Closed wenweih closed 3 weeks ago

wenweih commented 1 month ago

May I know do it any plan to add close modal API, something like that: IDKit.close()

I am currently utilizing IDKit in my project and have encountered situations where I need to programmatically close the modal generated by IDKit.

This functionality is particularly necessary in the context of handling verification callbacks, where an automatic or manual dismissal of the modal may be required based on the verification outcome or other logic within the handleVerify callback function.

Thanks.

andy-t-wang commented 1 month ago

Hi we can look into this

andy-t-wang commented 3 weeks ago

Are you using react or standalone

andy-t-wang commented 3 weeks ago

If you're using react we do have hooks you can use to close the modal

https://docs.worldcoin.org/reference/idkit