worldcoin / idkit-js

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

feat: validate bridge_url #232

Closed 0xPenryn closed 8 months ago

0xPenryn commented 8 months ago

Validates bridge_url in idkit-core, fails verification and throws error if:

Logs a non-blocking console warning if the bridge_url hostname does not end with worldcoin.org or toolsforhumanity.com -- to be removed once the restriction is lifted in World App.

Additionally, idkit-core now properly handles trailing slash. A bridge_url input as ...coin.org/ or ...coin.org will both function properly.

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
idkit-js-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 0:01am
0xPenryn commented 8 months ago

@m1guelpf as localhost bridge would only work when running IDKit, Bridge, and Simulator all locally, I've add a validation bypass when using a staging app_id and localhost bridge_url

pdtfh commented 8 months ago

ok to merge from my side