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

[Auth] Add support for upcoming Recaptcha changes #14201

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

ncooke3
Copy link
Member

@ncooke3 ncooke3 commented Dec 2, 2024

Corresponding PR for google/interop-ios-for-google-sdks#16 that is backwards compatible for Recaptcha ≤18.6 (edit: backwards compatible is not needed due to dependency versioning)

Support Cases

  1. Old Recaptcha x Old Firebase → ✅ Will continue to work, no changes
  2. Old Recaptcha x New Firebase → ❌ Won't work because of conflicting recaptcha interop dependency
  3. New Recaptcha x Old Firebase → ❌ Won't work because of conflicting recaptcha interop dependency
  4. New Recaptcha x New Firebase → ✅ Will work bc of this PR

Testing (manual tests– is reCaptcha token generated?)

  • CocoaPods - dynamic linking
  • CocoaPods - static linking
  • SPM manual test
  • Zip manual test (will wait for new Recaptcha interop and Recaptcha SDK to be released)

TODOs

  • Looking into the existing rCE unit test PRs to see if we can get unit tests checked in too

cc: @walterjgsp

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

@ncooke3 ncooke3 marked this pull request as ready for review December 6, 2024 16:19
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll refactor this further in a following PR. It more easily reviewable now as it's a direct port of the ObjC bridge logic.

@ncooke3 ncooke3 added this to the 11.7.0 - M158 milestone Dec 6, 2024
@ncooke3
Copy link
Member Author

ncooke3 commented Dec 6, 2024

Adding this to M158 milestone for consideration. Will probably slip to M159.

@@ -1,3 +1,7 @@
# Unreleased
- [changed] Using reCAPTCHA Enterprise and Firebase Auth requires reCAPTCHA
Enterprise X.Y.Z or later.
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: update with final Recaptcha version

Copy link
Member

Choose a reason for hiding this comment

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

And the Recaptcha non-beta version publishing gates the merge.

Comment on lines +170 to +171
// let client = try await recaptcha.fetchClient(withSiteKey: siteKey)
let client = try await recaptcha.getClient(withSiteKey: siteKey)
Copy link
Member Author

Choose a reason for hiding this comment

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

when recaptcha SDK is released:

Suggested change
// let client = try await recaptcha.fetchClient(withSiteKey: siteKey)
let client = try await recaptcha.getClient(withSiteKey: siteKey)
let client = try await recaptcha.fetchClient(withSiteKey: siteKey)

Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

Thanks for getting rid of the ObjC!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants