Gmail Authentication in React Native.
Gmail Authentication in React Native.
React Native 0.60 is the latest version (at the time of writing this post), and is much more
reliable and robust than previous versions. It also includes breaking changes related to
AndroidX, but don’t worry we’ll create an Android test app as well.
Social logins — Social logins are a popular and easy way of authentication in mobile apps. You
must have seen Google, Facebook, Instagram logins in almost all the modern apps. Social
logins are easy to use and more reliable for quick integrations.
Create you own back-end — You can create your own back-end in Node.js, Go, Django or
Ruby-on-rails, and connect your app authentication to your own back-end. This method is
favored by developers who need full control over the user authentication. But this method is the
most time taking one as well.
Back-end as a Service (BaaS) — You can use pre-built BaaS platforms which allows easy
integration of authentication in your apps. Basically, these platforms provide you a ready-made
back-end, so you don’t have to make one on your own. Firebase, Parse, Back4App are some
BaaS platforms.
Firebase is the most popular among these for mobile apps, which we’ll study in next section
Firebase
Firebase is a Backend-as-a-Service (BaaS) platform. It started as a YC11 startup and grew up
into a next-generation app-development platform on Google Cloud Platform. It is getting popular
by the day because of the ease of integration and variety of functionalities available on it.
A lot of quick integrations are available with Firebase. Some of these are listed below:
Real-time database
Email Authentication
Social logins
In-app messages
Push notifications
Analytics
Crashlytics
Remote config
Firebase is quickly growing to become the most popular mobile app back-end platform.
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
Steps for Google authentication
We will follow these step-by-step instructions to create our React Native app with Google
authentication