Oauth

google-services.json

  • For some reason, you need to include the client id in initialization.

  • NOTE Ref: https://pub.dev/packages/google_sign_in_android#integration If you are not using google-services.json, you need to pass the client ID of the web application you registered as the serverClientId when initializing the GoogleSignIn instance.

  • NOTE: YOU NEED TO ADD SHA 1 TO GET client_type=1

client_type: 1 (Android)

  • This signifies an OAuth client specifically for Android applications.
  • It’s typically associated with an Android package name and SHA-1/SHA-256 fingerprints for authentication.

client_type: 2 (iOS)

  • This is for iOS applications, often linked to an iOS bundle ID.
client_type: 3 (Web):
  • This represents a “Web client” or “Web application” OAuth client.
  • Even though it’s called “Web,” it’s frequently used in Flutter for Google Sign-In on Android and iOS when you need to authenticate with a backend server.
  • This client ID is often used as the serverClientId in the google_sign_in package for Flutter.