Skip to content

Latest commit

 

History

History
128 lines (104 loc) · 6 KB

README.md

File metadata and controls

128 lines (104 loc) · 6 KB


Firebase Authentication

Firebase Authentication

What is Firebase

Firebase is a mobile and web application development platform developed by Firebase, Inc. in 2011, then acquired by Google in 2014.As of October 2018, the Firebase platform has 18 products,which are used by 1.5 million apps. Firebase's first product was the Firebase Real-time Database, an API that synchronizes application data across iOS, Android, and Web devices, and stores it on Firebase's cloud. The product assists software developers in building real-time, collaborative applications.

Firebase Services

  1. Firebase Realtime Database
  2. Cloud Firestore
  3. ML Kit
  4. Cloud Function
  5. Firebase Authentication
  6. Firebase Cloud Storage
  7. Firebase Hosting
  8. Firebase Analytics
  9. Crashlytics
  10. Performance Monitoring
  11. Firebase Test Lab
  12. App Distribution
  13. Firebase Dynamic Links
  14. In-App Messaging
  15. Predictions
  16. A/B Testing
  17. Firebase Cloud Messaging(FCM)
  18. Remote Config

In this repository we learn about Firebase Authentication.

Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.

Firebase Authentication integrates tightly with other Firebase services, and it leverages industry standards like OAuth 2.0 and OpenID Connect, so it can be easily integrated with your custom backend.

In this repository we learn about NINE diffrent authentication method.

  1. OTP based Mobile Number Authentication.
  2. Google Account based Authentication
  3. Facebook Account based Authentication
  4. Twitter Account based Authentication
  5. Github Account based Authentication
  6. Yahoo Account based Authentication
  7. Email Account based Authentication
  8. MSLive Account based Authentication
  9. Play Games Account based Authentication

Here is step to ADD Firebase and Firebase SDK to android project.

  1. Create one Android project in Android Studio.
  2. Login to Firebase and goTo Firebase Console.

Screenshots

  1. Click on Add Project Button and create new Project.

Screenshots

  1. After Successfully project creation Click on Android ICON of Header for Project Registration for Android.

Screenshots

  1. Add Project ID or ApplicatiID or packageName of created application and register the app

Screenshots

  1. Then download the google-services.json config File from the step and add copy the file and paste to your android project App level directory (Means project_directory/app/google-services.json).
  2. Add Firebase SDK and authentication dependencies.
  build.gradle(Project Level)
  
  buildscript {
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath 'com.google.gms:google-services:4.3.3'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}
  build.gradle(App Level)
  
dependencies {
    // Add the Firebase SDK for Google Analytics
    implementation 'com.google.firebase:firebase-analytics:17.2.1'                                  

    // Add Firebase Auth Dependencies
    implementation 'com.google.firebase:firebase-auth:19.2.0' 
}
apply plugin: 'com.google.gms.google-services'
  1. We're Set to start diffrent authentication option.

1) Phone Number Authentication

First you need to enable the Phone Auth Provider in Firebase Console.

Screenshots

For This kind of Contact hint you need to implement

build.gradle(App Level)

dependencies {
  // Google Auth Dependencies for Device Mobile N0. Popup
  implementation 'com.google.android.gms:play-services-auth:17.0.0' 
}
apply plugin: 'com.google.gms.google-services'

Screenshots

Phone Number Auth All code (Contact Hint, Request OTP, Verify OTP, Resend OTP) Writen in MobileAuthActivity Class

Some Important links related Firebase

  1. Products
  2. Use Cases
  3. Pricing
  4. Docs
  5. Support