Skip to content

Conversation

demolaf
Copy link

@demolaf demolaf commented Sep 23, 2025

  • Precondition validations for auth provider configurations including Google email scope warnings, Facebook dependency checks, and phone number format validation
  • Provider-specific validation rules for email link settings, anonymous provider restrictions, and duplicate provider detection
  • Tests for all auth provider validation scenarios and configuration edge cases

@demolaf demolaf marked this pull request as draft September 23, 2025 15:37
* which is required for security when upgrading anonymous users. Defaults to true.
*/

val isEmailLinkForceSameDeviceEnabled: Boolean = true,
Copy link
Author

Choose a reason for hiding this comment

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

this was a requirement and a config validation in the old auth library for EmailAuthProvider. When anonymous upgrade is enabled and email link is enabled, you must force same device for security purposes. here

)
) {
fun validate(context: Context) {
// TODO(demolaf): do we need this? since we are requesting this in AuthProvider.Google?
Copy link
Author

Choose a reason for hiding this comment

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

do we need to validate missing server client id?

Copy link
Contributor

Choose a reason for hiding this comment

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

Was the validation done on the current version of the library?

Copy link
Author

Choose a reason for hiding this comment

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

Yes but if you look reference in current version, when serverClientId is missing throws if not found during actual use.

@demolaf demolaf marked this pull request as ready for review September 24, 2025 07:50
- validate serverClientId empty string
- validate applicationId empty string
- remove @test(expected=) not descriptive
- tests covering AuthProviders Google and Facebook config validation
@Lyokone Lyokone merged commit f1dfd0c into firebase:version-10.0.0-dev Sep 24, 2025
2 checks passed
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