Member-only story

Firebase Authentication (Facebook And Google Sign In) With Flutter

Chatura Dilan Perera
2 min readMay 19, 2019

Here I’m going to describe how to use Firebase authentication with Flutter.

First you have to follow my previous post and make sure it is working.

  1. Add Firebase Authentication, Flutter Facebook Login and Google SignIn to your pubspec.yml and click on Package Get
#Sign in
firebase_auth: 0.6.6
google_sign_in: ^3.2.4
flutter_facebook_login: 1.1.1

2. Create a Facebook and and get the App Id and the App Secret

3. Go to your Facebase Console and Click on ‘Authentication Tab’ then click on Sign In method and enable Google and Facebook Logins. For facebook login enter App Id and the App Secret.

4. Copy the auth handler URL to your Facebook app valid OauthRedirect URIs

5. Add Android platform to your Facebook and enter package ID, Main Activity and key hashes. Use this commad to generate Key Hashes

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

6. Add iOS platform to yuor Facebook app and add bundle ID

7. Add following to your android app by creating the file /android/app/src/main/res/values/strings.xml

--

--

Chatura Dilan Perera
Chatura Dilan Perera

Written by Chatura Dilan Perera

Optimistic who loves to explore new technologies

No responses yet