You are here
Home > Flutter > Flutter Mobile OTP Verification using Firebase with Getx Package

Flutter Mobile OTP Verification using Firebase with Getx Package

Hello Friends, Today I am going to share how to do Mobile OTP Verification in Flutter using Firebase with Getx Package. GetX is an extra-light and powerful solution for Flutter. It combines high-performance state management, intelligent dependency injection, and route management quickly and practically. We will follow following steps to achieve Mobile OTP Verification:-

1. Create Firebase Project
2. Create App in Firebase Project
3. Enable Mobile Authentication
4. Create Flutter App
5. Generate Certificate Fingerprint and Provide it Firebase

Let’s get started

1. Creating Firebase Project

Step-Wise screenshots Taken While Creating Project

2. Create App in Firebase Project

Step-Wise screenshots Taken While Creating App in Project

3. Enable Mobile Authentication

Step-Wise screenshots Taken While Enabling Mobile Authentication

4. Create Flutter App

Paste google-services.json in App level directory which we have downloaded while creating App (see third screenshot of Create App in Firebase Project)

Now let’s start coding

build.gradle (Project Level)

build.gradle (Module Level)

pubspec.yaml

main.dart

views/login.dart

views/home.dart

controllers/auth_controller.dart

5. Generate Certificate Fingerprint and Provide it to Firebase

Run below command after going to android folder and copy SHA1 and SHA-256 and provide it to Firebase App by going to Project Settings see below screenshots for help

Output

Source Code

https://github.com/rajeshkumarsahanee/otp_login_app

Notes

1. Please make sure package name should match with your flutter app’s package name while creating App in Firebase Project

 

Thanks for Stoping by
If you find this helpful then please do share

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
https://www.zatackcoder.com

Comments

zatackcoder
Top

  Â