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

Recaptcha Enterprise integration with phone auth flows #13192

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

Conversation

pragatimodi
Copy link
Contributor

@pragatimodi pragatimodi commented Jun 27, 2024

Changes made

  • introduced recaptcha enterprise verification in phone auth flows
  • unit tests with rceMode = OFF

Unit tests continued in #13547
TODO: Figure out how to fake FIRGetRecaptchaToken to execute the pending tests

@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

@pragatimodi pragatimodi changed the base branch from inject-fields to release-11.0 July 8, 2024 15:46
@pragatimodi pragatimodi changed the base branch from release-11.0 to inject-fields July 8, 2024 15:47
@pragatimodi pragatimodi changed the base branch from inject-fields to main July 30, 2024 19:41
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.

Can you add unit tests for the new functionality?

@pragatimodi pragatimodi changed the title Barebones e2e flow for phone auth login Recaptcha Enterprise integration with phone auth flows Aug 27, 2024
FirebaseAuth/Sources/Swift/Auth/Auth.swift Show resolved Hide resolved
}
}

private func verifyClAndSendVerificationCodeWithRecaptcha(toPhoneNumber phoneNumber: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a api reference here? what does cl stand for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cl stands for client I think, deriving the name from an existing implementation of verifyClAndSendVerificationCode

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, might still worth adding a comment here.

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.

Expectations are usually needed for testing callback functions and not needed for testing async functions.

Copy link
Contributor

@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Choose a reason for hiding this comment

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

LGTM

}
}

private func verifyClAndSendVerificationCodeWithRecaptcha(toPhoneNumber phoneNumber: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

got it, might still worth adding a comment here.

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.

4 participants