react-turnstile
react-turnstile copied to clipboard
🐛 Bug: When using the Turnstile component, if you stay on a page for too long, useNavigate will fail.
Bug Report Checklist
- [X] I have tried restarting my IDE and the issue persists.
- [X] I have pulled the latest
mainbranch of the repository. - [X] I have searched for related issues and found none that matched my issue.
Expected
Ability to use useNavigate
Actual
Ability to use useNavigate
Package Version
1.0.0
Browsers
Chrome
Additional Info
No response
It is possible that the page has been inactive for a long time (for example, after being idle for a period of time), and the Turnstile session may have expired?
You will still find this problem when using a vanilla Turnstile Widget,
Hey!
What do you mean with useNavigate? Is this something related to an specific framework?
It is possible that the page has been inactive for a long time, and the Turnstile session may have expired?
Probably, not sure. In that case you can try the .isExpired() and .reset() methods.
You will still find this problem when using a vanilla Turnstile Widget
If the problem happens using a vanilla Turnstile Widget too, may not be able to fix it in the library, but we can try to find a solution together.
Just use the browser's rollback function 。 such as window.history.back
I can't reproduce the error
When I use it, it will load a js file, and I found that window.history.pushStat is rewritten in the file. Is this the reason?