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 Realtime Database
- Cloud Firestore
- ML Kit
- Cloud Function
- Firebase Authentication
- Firebase Cloud Storage
- Firebase Hosting
- Firebase Analytics
- Crashlytics
- Performance Monitoring
- Firebase Test Lab
- App Distribution
- Firebase Dynamic Links
- In-App Messaging
- Predictions
- A/B Testing
- Firebase Cloud Messaging(FCM)
- Remote Config
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.
- OTP based Mobile Number Authentication.
- Google Account based Authentication
- Facebook Account based Authentication
- Twitter Account based Authentication
- Github Account based Authentication
- Yahoo Account based Authentication
- Email Account based Authentication
- MSLive Account based Authentication
- Play Games Account based Authentication
- Create one Android project in Android Studio.
- Login to Firebase and goTo Firebase Console.
- Click on Add Project Button and create new Project.
- After Successfully project creation Click on Android ICON of Header for Project Registration for Android.
- Add Project ID or ApplicatiID or packageName of created application and register the app
- 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).
- 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'
- We're Set to start diffrent authentication option.
First you need to enable the Phone Auth Provider in Firebase Console.
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'
Phone Number Auth All code (Contact Hint, Request OTP, Verify OTP, Resend OTP) Writen in MobileAuthActivity Class