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

[IAMRISK-2817] Update API for Arkose to use a callback based API #1349

Merged
merged 11 commits into from
Oct 19, 2023
Merged

[IAMRISK-2817] Update API for Arkose to use a callback based API #1349

merged 11 commits into from
Oct 19, 2023

Conversation

srijonsaha
Copy link
Contributor

@srijonsaha srijonsaha commented Oct 17, 2023

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
  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@srijonsaha srijonsaha temporarily deployed to external October 17, 2023 08:12 — with GitHub Actions Inactive
@srijonsaha srijonsaha changed the title Update API for Arkose to use a Promise Update API for Arkose to use a callback Oct 17, 2023
@srijonsaha srijonsaha marked this pull request as ready for review October 17, 2023 10:18
@srijonsaha srijonsaha requested a review from a team as a code owner October 17, 2023 10:18
src/web-auth/captcha.js Outdated Show resolved Hide resolved
src/web-auth/captcha.js Outdated Show resolved Hide resolved
src/web-auth/captcha.js Show resolved Hide resolved
src/web-auth/captcha.js Outdated Show resolved Hide resolved
test/web-auth/captcha.test.js Outdated Show resolved Hide resolved
@srijonsaha srijonsaha changed the title Update API for Arkose to use a callback [IAMRISK-2817] Update API for Arkose to use a callback Oct 17, 2023
src/web-auth/captcha.js Outdated Show resolved Hide resolved
src/web-auth/captcha.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
@srijonsaha srijonsaha changed the title [IAMRISK-2817] Update API for Arkose to use a callback [IAMRISK-2817] Update API for Arkose to use a callback based API Oct 19, 2023
src/web-auth/captcha.js Outdated Show resolved Hide resolved
src/web-auth/captcha.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
src/web-auth/index.js Outdated Show resolved Hide resolved
@frederikprijck frederikprijck enabled auto-merge (squash) October 19, 2023 13:07
@frederikprijck frederikprijck enabled auto-merge (squash) October 19, 2023 13:08
@srijonsaha srijonsaha temporarily deployed to external October 19, 2023 13:28 — with GitHub Actions Inactive
@frederikprijck frederikprijck merged commit cef7c7d into auth0:master Oct 19, 2023
11 checks passed
@srijonsaha srijonsaha deleted the arkose-captcha branch October 19, 2023 13:38
* @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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callback -> captchaLoadedCallback right?

Copy link
Contributor

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 👍

Copy link
Member

@frederikprijck frederikprijck Oct 19, 2023

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.

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.

3 participants