Skip to content

Hosted Domain Not Working Properly On Google Sign In 7.1.1 #174200

@luqmanulhakiem

Description

@luqmanulhakiem

Steps to reproduce

  1. initialize GoogleSignIn using hostedDomain
  2. run authenticate with scopes
  3. see list email displaying on google sign in pop up

Expected results

list email with domain that already registered on hostedDomain when initializing GoogleSignIn

Actual results

displaying all email in outside of registered domain.
example:

  • i registered mycustomdomain.com , but google sign in pop up shows all my email including gmail.com

Code sample

My Code
final GoogleSignIn gsi = GoogleSignIn.instance;
  final List<String> gsiScopes = [
    "profile",
    "email",
  ];

  await gsi.initialize(
    hostedDomain: "customdomain.com",
    serverClientId: "MY_SERVER_CLIENT_ID",
    clientId: "MY_CLIENT_ID",
  );
 
GoogleSignInAccount? googleUser;

googleUser = await gsi.authenticate(scopeHint: scopes);

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.8, on macOS 14.5 23F79 darwin-arm64, locale en-ID)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 16.1)
    ! CocoaPods 1.15.2 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.103.1)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for iPhone Luqmanul Hakiem. Ensure the device is unlocked and attached with a cable
      or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 1 category.

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listfyi-androidFor the attention of Android platform teamp: google_sign_inThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions