Firebase, fb sign-in and Flutter

Aseem Wangoo
Jul 14, 2018 · 3 min read

Here to create…


All in one Flutter Resource: https://flatteredwithflutter.com/firebase-facebook-sign-in-and-flutter/

Firebase, fb sign in and Flutter.

Wandering through the journey in Flutter, and programming things not done before (at least in my knowledge :)), seeking for ideas until I stuck onto this post (Login into Facebook using Firebase)..

Sign in/out with Facebook…

Let’s begin….

Getting started (with firebase) is simple,

NOTE : Please note that the name of your app should be same in the Firebase, your project’s manifest.xml and in the app-level build.gradle.

Go through this article, if not understood.

  • A small advice, always fill the SHA certficate fingerprint, even though it says optional
Scratched for brevity…
  • Go to
Firebase Authentication

Click authentication and enable the fb sign in…It would ask you for AppID and AppSecret. (for which you have to register your app first in facebook developer console).

Documentation is concise and clear in the fb dev console. Important things to note are the steps:

Step 4. Edit Your Resources and Manifest

Step 5. Associate Your Package Name and Default Class with Your App

Step 6. Provide the Development and Release Key Hashes for Your App

From Step 7 to 10, you may skip them…

Last step,

OAuth Setup for Fb and Firebase…

Do copy the circled url in Facebook login settings (developer console)

Fb developer console…

Coming to Flutter side now,

Import the following packages,

flutter_facebook_login and firebase_auth

Flutter packages…

All setup, now programming part…………

On click of Sign in with Facebook, the following function is called :

Sign In part

On click of Sign out,

Sign out part…

Now what special I did was to display all the details which came from firebase (like a boss )……

Output from firebase

For complete source code, visit

https://github.com/AseemWangoo/flutter_programs/blob/master/FbSignIn.zip

P.S………………


The Flutter Pub is a medium publication to bring you the latest and amazing resources such as articles, videos, codes, podcasts etc. about this great technology to teach you how to build beautiful apps with it. You can find us on Facebook, Twitter, and Medium or learn more about us here. We’d love to connect! And if you are a writer interested in writing for us, then you can do so through these guidelines.

FlutterPub

The Pub(lication) for all about the Flutter and its magic

Aseem Wangoo

Written by

Founder of Flatteredwithflutter.com | Flutter, Java enthusiast | Medium writer | YouTuber | Writer at FlutterPub

FlutterPub

The Pub(lication) for all about the Flutter and its magic

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade