Open onmyway133 opened 5 years ago
https://developers.google.com/android/guides/client-auth
Certain Google Play services (such as Google Sign-in and App Invites) require you to provide the SHA-1 of your signing certificate so we can create an OAuth2 client and API key for your app
https://console.developers.google.com/apis/credentials
Credentials -> OAuth client id If we specify SHA1 in firebase, then https://console.developers.google.com will generate an Android oauth for us
keytool -list -v -keystore {keystore_name} -alias {alias_name}
Use correct keystore for debug and release
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.config
}
debug {
signingConfig signingConfigs.config
}
}
https://medium.com/flutter-community/auth-in-flutter-3f4ffe0ddcf8
It seems no need for adding google gms dependency, flutter seems to add
api 'com.google.android.gms:play-services-auth:16.0.1'
🤔build.gradle classpath 'com.google.gms:google-services:3.2.1' app/build.gradle apply plugin: 'com.google.gms.google-services'
google-services.json