Hi, i got a question (potential bug?). Here is the case. I initialize the turnstile widget giving it specific cData value. Then i get the token through ref using promise await ref.current?.getResponsePromise();. After that action i got a button, that clicking on it, the cData value of the widget changes, resetting the widget. The next time i try to get token with await ref.current?.getResponsePromise(); it throws the 'No response received' error. I created a reproducable repo
My actual goal is to silently initialize the widget. Then when a user clicks a button i want to retrieve the token if possible without any UI change. If thats not possible i want to show the widget and wait for user's input. Have you got in mind another approach that would may be more efficient for my goal? I really appreciate any help.
Hi, i got a question (potential bug?). Here is the case. I initialize the turnstile widget giving it specific
cData
value. Then i get the token through ref using promiseawait ref.current?.getResponsePromise();
. After that action i got a button, that clicking on it, the cData value of the widget changes, resetting the widget. The next time i try to get token withawait ref.current?.getResponsePromise();
it throws the 'No response received' error. I created a reproducable repocodesandboxUrl To reproduce:
My actual goal is to silently initialize the widget. Then when a user clicks a button i want to retrieve the token if possible without any UI change. If thats not possible i want to show the widget and wait for user's input. Have you got in mind another approach that would may be more efficient for my goal? I really appreciate any help.
Thanks in advance!