Turnstile tools for mobile

Seems to be a widely requested feature set for mobile devices.

1 Like

I would like to ask if there are any plans to create an SDK for iOS and Android which will help implement Turnstile with a Pre Clearance cookie support.

Right now as a team we are working on adding this functionality to our mobile app but it requires some tricky solutions like opening a WKWebView, getting a cf_clearance cookie and manually appending it to all of our HTTP requests. The necessarity of having to present WebView to render a JS script doesn’t look like a user friendly solution from UX perspective. Even if Turnstile decides to render his widget as “non-interactive” we still have to create a new WebView just to be able to run JS script.

Due to this we are wondering if this would be possible to create an SDK in near future which will make this process less clunky to implement.

1 Like

@oshariff Is it even possible to implement a Turnstile with Pre-clearance cookie on mobile apps? What we want to do is protect some endpoints with Cloudflare. In case we receive the cf_mitigated header, then we want to open a web view redirecting the user to our page (something like https://ourproduct.com/challenge) and then present a JavaScript CF widget. After receiving the cf_clearance cookie, we want to close the web view and then extract that cookie so we can append it to our next API network requests (they are located under https://ourproduct.api/). Will it even work?"