Social Login allows you to improve convenience for your customers and increase conversion rates for your signups and offerings. Instead of letting users fill in forms, they just need to click to sign in with LinkedIn.
In this video we write node.js code for the redirect endpoint and code for getting an OAuth access token. It integrates with the code we have written in part 1. We deploy it as AWS Lamda Function behind the AWS API Gateway.
This is the second part of a 3-part series on social login:
- Social Login Part 1: Write code to call the LinkedIn APIs to get profile and email data.
- Social Login Part 2: Write code for the redirect endpoint and code for getting an access token.
- Social Login Part 3: Write code to push signup information to a mailinglist provider via API.
You might also want to watch: How to use the LinkedIn API and OAuth
In the video, I show you how to write a node.js application that implements the Linkedin OAuth redirect endpoint. We write code for receiving the Authorization code parameter and call the OAuth token endpoint to exchange the Authorization code into an access token. With this dynamically created access token we can then call the LinkedIn APIs (Social Login Part 1). We write the redirect endpoint in node.js as a serverless API, deploy it on AWS Lambda, and protect it by an AWS API Gateway.
I provide the source code for you here. I hope it makes your life much easier because it guides you through the process, and helps you to get all the nitty-gritty details right. Without it, you would probably spend a lot of time reading the documentation or figuring it out by trial and error.
Sign up via LinkedIn or via email below.
Learn about OAuth in a more structured way, with step-by-step guides: