Skip to content

Instantly share code, notes, and snippets.

@thekarel
Last active August 10, 2019 13:05
Show Gist options
  • Save thekarel/c6963e540e176deab9204f990ce3dcc6 to your computer and use it in GitHub Desktop.
Save thekarel/c6963e540e176deab9204f990ce3dcc6 to your computer and use it in GitHub Desktop.
Enable Google Auth with Firebase in a Flutter app

Get your SHA keys:

Production:

keytool -list -v -alias <your-key-name> -keystore <path-to-production-keystore>

For the debug key, look at https://stackoverflow.com/a/56091158 or run keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Finally, the google play ones are on https://play.google.com/apps/publish/ > App signing

Put all these into the Firebase project > android app > keys section

Install dependencies

Add these to pubspec.yaml

firebase_core: ^0.4.0+8
firebase_auth: ^0.14.0+1
google_sign_in: ^4.0.6

Read https://pub.dev/packages/firebase_auth as there are extra steps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment