Repository navigation
Hosted Domain Not Working Properly On Google Sign In 7.1.1 #174200
Copy link
Copy link
Closed
flutter/packages
#9871Closed
Copy link
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfyi-androidFor the attention of Android platform teamFor the attention of Android platform teamp: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
Steps to reproduce
- initialize GoogleSignIn using hostedDomain
- run authenticate with scopes
- 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.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfyi-androidFor the attention of Android platform teamFor the attention of Android platform teamp: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Activity
stuartmorgan-g commentedon Aug 21, 2025
What platform(s) are you seeing this on?
stuartmorgan-g commentedon Aug 21, 2025
It looks like I missed wiring this up on Android. Oddly, only one of the two Android flows seems to have a way to specify hosted domain, so I'll need to investigate how to handle that. I may need to restrict one-tap to previous sign-ins if there's a hosted domain set.
Please let me know if you are seeing issues with hosted domains on any platforms other than Android.
[google_sign_in] Implement hosted domain on Android (flutter#9871)
github-actions commentedon Sep 12, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[google_sign_in] Implement hosted domain on Android (flutter#9871)