Posted by: Rahul Upadhyay
What is Social Media Login?
Every other application rather it be a mobile application or a web application supports social media login. This is the way that we are authorizing the user to register with our application and not further investigation needed for the user authenticity. Most popular social media login we are seeing in the tech world are
- Login with Facebook
- Login with Google
- Login with Apple
- Login with LinkedIn
- Login with GitHub
- And so on…
Why Social Media Login is so important?
Let me give you an example with one mobile application which require user to register with the application. Now to validate the user’s email address or phone number there are several ways. The most common way is to send the email activation link to the registered email address. Until the user validates his/her account with that link the application will not allow the user to interact with your app. There are certain phishing tools which generates the temporary email addresses which we need to filter. To avoid this lengthy process, the one tap solution is Social Media Login.
Now, when you choose to login with the social media account which is already set and validate by respective social media, it gives the authenticity to our application that the potential user’s email address/ account is valid and can be registered and use our application. With this, you can interact with the application on the go without email activation link or OTP (One Time Password).
How Social Media Login works?
The main question which should be understood by the developer and most importantly the client or the application owner who wants to know what is cooking behind the app.
To understand this more clearly, let’s understand the following simple Flow chart:
- On the Login screen, you could choose either to login with Email and Password
- Or can choose social media login
- Now, here the social media can be any, Google, Facebook, Twitter, LinkedIn, GitHub or other platform which allows the user to connect their existing account with our app
- We will be checking if the account is private or not? Here we are checking if the user has hidden the email address to be fetch from the SDK or not. As we are authenticating the user with unique email address, we are checking this on priority.
- If the account is private and not sharing the email address then we consider that account to be register as a normal registration.
- If the account is public and we are able to fetch the email address
- We check this email address against the application/server to identify that the user is returning user or signing up for the first time!
- If the user is returning user, then we will authenticate the user and allow the user to log in to the app on a single tap.
- If the user is a new user, then we will pass the social media information such as Email, Name, Birthdate (if required) to the registration screen. Here we are also passing the information such as social token/id
- On registration screen, the user will fill up the remaining information and register self.
- On success we will allow the user to log in to the app.
- There are pre-defined processes like if the user is registering with a private account, then we will be sending an email with Email Activation Link to validate the email address and check the user’s authenticity
- Once the user activates the account then we can send a Welcome email, letting the user know more about the app.
- If the user is registering with the public account, then we can send a Welcome email, letting the user know more about the app.
- If you are here, we are not sending any email activation link email to the social media authenticated user (if the account is public, which is common on several platforms. Exceptions are Facebook and Twitter).
Points to ponder
- To integrate any social media login, you need to create the respective application listing to the third-party application which provides your application requited permissions to the user to Grant or not.
- Here is one good example how to create a Facebook app on the Facebook developer console to allow the developer to integrate with the application.