google-signincredential-managerandroid-credential-managersign-in-with-google

Android Credential Manager: what's the differences between GetSignInWithGoogleOption and GetGoogleIdOption


When Authenticate users with Sign in with Google, the official document says "To trigger the Sign in with Google button flow, use GetSignInWithGoogleOption instead of GetGoogleIdOption", can someone helps to explain what's the meaning of this? What's the differences between GetSignInWithGoogleOption and GetGoogleIdOption and when should I use GetSignInWithGoogleOption. Thanks

I tried both GetSignInWithGoogleOption and GetGoogleIdOption. When using GetSignInWithGoogleOption, the UI shown to the user is different; instead of a bottomsheet, it's a regular dialog. What's more , GetSignInWithGoogleOption allows add another account. But any other differences?


Solution

  • Here are some differences:

    There are some more subtle differences that I don't get into them here. Also note that our recommendation is to show the bottomsheet flow for all types of credentials that your app supports when user opens the app, and also add the 'Sign-in with Google" button to your sign-in page so if, say, user closes the bottomsheet accidentally, they still have a way to sign-in using their Google accounts.