Phone Authentication Using Firebase In Flutter

Lakshydeep Vikram
4 min readSep 10, 2021

You’ll get to know about how to use phone authentication using firebase in flutter. I’ll show you how to do phone auth in flutter project like whatsapp, viber and imo. If you are not registered then it will redirect to the register screen and if you are a registered user then it will redirect to homepage.

Here we go:

Firebase setup

  1. Create firebase project for your app →click
  2. Register your flutter app in the firebase project you’ve created above.
  3. Add SHA-1 key in the registration process of firebase project.
    (Generate SHA-1 Key → click)
  4. Download googleservice.json file.
  5. Follow the steps mentioned there in the firebase and do accordingly.
  6. Navigate to the Authentication section in the firebase console.
  7. Enable phone provider
  8. Navigate to Firebase Database
  9. Select Production Mode and choose the location and create database.
  10. Go to rules and replace false with true and publish the changes.

--

--

Lakshydeep Vikram
Lakshydeep Vikram

Written by Lakshydeep Vikram

Software Developer | Google Dev Library Author | Flutter Enthusiast

Responses (1)