DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Introducing Firebase Phone Auth [Video]

Introducing Firebase Phone Auth [Video]

Now, you can add a feature allowing your Firebase app's users to log in with a phone number. See how this works in this article and video.

Laurence Moroney user avatar by
Laurence Moroney
·
Jun. 08, 17 · Mobile Zone · Opinion
Like (2)
Save
Tweet
5.39K Views

Join the DZone community and get the full member experience.

Join For Free

When Firebase was first released, it came with a number of authentication schemes:

You could build an app for email and password authentication (iOS, Android, Web), where the user provides you with basic details — and Firebase would manage signing in using those as their identity. You could also build using federated identity where, instead of signing up for your app, users could simply sign in using credentials provided by third parties such as Google, Facebook, Twitter or GitHub, or anonymous authentication where you could apply security rules to people who haven’t yet signed up.

One type of authentication that was requested by a number of developers was the ability to sign in using a phone number. With that in mind, we’re delighted to announce that Firebase Auth now supports phone number authentication. If you’re currently using the Digits SDK for phone number auth, check out the announcement here for details on the migration to Firebase Auth.

Here’s how Firebase Phone Auth works.


The Sign In Screen

Here’s an example of an app that supports phone auth as well as federated identity via Google and Facebook, and basic email/password authentication. It has been built using FirebaseUI, so many of the flows that you see in this article are automatically implemented for you when you integrate it.

As you can see at the bottom of the screen, there’s a ‘Sign in with Phone’ option. Let’s take a look at what happens when the user taps that.

Sign In Flow

When the user first taps the Sign In with Phone button, they’ll enter the phone number for the device. When they press "Verify," the number will be sent to Firebase, which will generate a 6-digit code that is sent via SMS to their device.

If the user enters the correct code, Firebase will validate them and add them as a recognized user. They’ll then stay signed in for future sessions. You’ll see them as a verified user in the Firebase Console:

You can learn more about Firebase Authentication on the Firebase Developers Site.

Firebase UI is an Open Source library that lets you quickly get up and running with best-practice sign in and sign up flows. Phone Auth with Firebase UI is presently available on iOS and the Web, and coming soon to Android. We’re continuing to grow and build Firebase and Firebase Authentication, and we’d love to hear your feedback, so please reach out to us at firebase.google.com/support.

Firebase

Published at DZone with permission of Laurence Moroney, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The Most Popular Kubernetes Alternatives and Competitors
  • Is Java Still Relevant?
  • 10 Steps to Become an Outstanding Java Developer
  • How to Submit a Post to DZone

Comments

Mobile Partner Resources

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo