Simplifying Secure User Login: Facebook Authentication for Your Apps
Do you ever worry about how painful it is for users to create unique usernames and remember passwords just for your app? Strong passwords are almost impossible to remember, shared passwords create a huge vulnerability, and weak passwords are of no good use. Plus, many users are turned off by the effort it takes to provide basic profile information for an app.
As a developer, you have a lot to think about when it comes to building an app: the front end, the user experience, the design, etc. Worrying about users forgetting their app usernames and passwords – and therefore losing access to your app – takes away valuable time that could be spent on these elements. Instead of worrying about getting users to provide you some basic information about themselves, you could be focusing on your user interface. Rather than having to choose between living with a hinderance to the adoption of your app or compromising the security of your users, you can plan how to monetize your app, and actually get a good sleep.
Over the last few months, we received many requests asking for Facebook integration with Kinvey users. Our latest release makes it very easy for you to do exactly that – allow your users to login to your app using their Facebook accounts.
This is our first feature towards offering social integration. Our goal is to bring you features that enable broader and deeper integration into the core experience offered by Facebook and other social networks.
To integrate Facebook with Kinvey, only a few additional lines of code are required:
Our iOS SDK is designed to work with the Facebook SDK library 3.0. The Facebook SDK will take care of requesting the user credentials and returning a valid token to the Kinvey SDK. You can download the Facebook SDK for iOS here.
Once you have a valid Facebook token, using it to log the user into Kinvey is a simple call to loginWithFacebookAccessToken:.
We’ve integrated Facebook login with the KinveyGram sample application. This example shows how to login a user either with a username and password or with the Facebook token.
Our Android SDK is designed to work with the Facebook SDK library. The Facebook SDK will take care of requesting the user credentials and returning a valid token to the Kinvey SDK.
You can download the Facebook SDK for Android here.
Once you have a valid Facebook token, using it to log the user in to Kinvey is a simple call to loginWithFacebookAccessToken:
Download version 1.3.2 of the library here.
Our REST API has been extended in the same way as our libraries above.
You can register a Facebook account using an OAuth access token while creating a Kinvey user, you can remove that registration at any time, and you can login using OAuth access tokens against the same user from multiple devices.
You will find examples of API calls in our documentation.
When you use Facebook sign-on, we also retrieve and store some basic account information in the User collection like name and gender that will help you personalize the app experience to your users. The exact list is specified in our documentation. You can use the console data browser to access this information as well.
You asked for it, we built it! Sign up for Kinvey to start using this exciting feature and take a tour of the Kinvey platform too. You can also reach us with any questions, concerns, and feedback by emailing email@example.com.
Starting a new mobile project? Check out our mBaaS Savings Calculator for a price quote.