Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return promise when refreshing recaptcha token. #68

Merged

Conversation

ericp-mrel
Copy link

This PR returns a promise when calling the refreshReCaptchaV3 function, this enables use cases such as refreshing the token when a user submits a form to avoid token timeouts if a user has not filled out the form within two minutes of loading a page. Then once the token has been refreshed, you can be notified and resume the ajax form submission request.

I have also removed the rest function call as it is not needed and causes execution to take longer since it has to re-initialize the entire widget instead of just refreshing the token.

This allows refreshing the reCAPTCHA token and to be notified once the token has been refreshed.
@RyanDaDeng RyanDaDeng merged commit aea40c8 into RyanDaDeng:master Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants