-
Notifications
You must be signed in to change notification settings - Fork 493
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
[IAMRISK-2817] Update API for Arkose to use a callback based API #1349
Conversation
* @param {Function} [options.templates.error] template function returning a custom error message when the challenge could not be fetched, receives the error as first argument | ||
* @param {String} [options.lang=en] the ISO code of the language for recaptcha | ||
* @param {Object} [options.callbacks] An optional object containing callbacks called after captcha events (only for Arkose captcha provider) | ||
* @param {Function} [options.callbacks.onSolved] An optional callback called after the captcha is solved (only for Arkose captcha provider) | ||
* @param {Function} [options.callbacks.onError] An optional callback called after the captcha encounters an error with the error passed as the first argument (only for Arkose captcha provider) | ||
* @param {Function} [callback] An optional callback called after captcha is loaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callback
-> captchaLoadedCallback
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, that's an internal module, not the public interface 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The callback is typed as captchaLoadedCallback
in jsDocs, but the argument name is still callback, or done, or whatever is used in the specific case where we use callbacks. The argument shouldnt be named the same as the type, regardless of internal of public interface.
Changes
Making the Arkose API integration more simpler for more out of the box integration with our custom template. The API is now also more generic so it'll be convenient if we add more providers.
References
https://auth0team.atlassian.net/browse/IAMRISK-2817
Testing
arkose.mp4
Checklist