FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

Google Sign In - disable email scope

Open EthanLozano opened this issue 4 years ago • 1 comments

Similar to 1899, would it be possible for FUIGoogleAuth to exclude a request for an email address? I have deliberately excluded an email address on different platforms and sign in providers to better respect user privacy, and I would like to do the same for Google Sign In on iOS.

Expected API

Either, use the scopes array that the developer provides to exclude the email scope (kGoogleUserInfoEmailScope):

    FUIGoogleAuth(authUI: authUI, scopes: [kGoogleUserInfoProfileScope])

Or, allow the developer to adjust a property on the FUIGoogleAuth object that excludes the email scope:

    googleProvider.options = FUIGoogleAuthOptions(requestEmail: false)

FirebaseUI-Android equivalent

  AuthUI.IdpConfig.GoogleBuilder()
      .setSignInOptions(GoogleSignInOptions.Builder()
          .requestId()
           // Omit .requestEmail()
           .build())
      .build()
  • Language: Swift
  • iOS version: 14.0
  • Firebase SDK version: 8.8.0
  • FirebaseUI version: 12.0.2
  • CocoaPods Version: 1.11.2

EthanLozano avatar Oct 21 '21 19:10 EthanLozano

Thanks for filing this! I'm marking this as a feature request for now.

sam-gc avatar Oct 25 '21 16:10 sam-gc