Phone-based Sign Up on Android using AccountKit + Firebase

Firebase is great for building mobile apps without writing much server code. Unfortunately, it does not provide a way for signing up users using a One Time Password (OTP) sent by SMS. That’s where Facebook’s AccountKit does a great job.

AccountKit and Firebase are both great, but it takes some work to make them work together. I’ve created a helper class and some simple server code that to take away the complexity and provide a simple integration.


Here’s the result of the code that follows:

I hope I’ll get around to writing a detailed tutorial at some point, but for now I’m just putting up the code with some documentation. It assumes that you have set up AccountKit and Firebase in your app already (links to setup instructions are provided).


The helper class ‘FirebaseAccountKit’ takes the result from the AccountKit login flow and creates a Firebase user by connecting to the server endpoint ‘server.js’. ‘AccountKitLoginActivity’ demonstrates the usage of ‘FirebaseAccountKit’.

This post is probably not too helpful in its current form, but I’m putting it up just in case this is exactly what somebody is looking for! ;-)


Founder, Jovian

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store