15% off membership for Easter! Learn more. Close

Describe how LinkedIn oauth works.

Asked at Linkedin
473 views
eye 473 views eye 473 views
Answers (1)
crownAccess expert answers by becoming a member

You'll get access to over 3,000 product manager interview questions and answers

badge Platinum PM

Clarification:

By how does LinkedIn Oauth works, we are trying to understand how the "Sign in with Google" and "Sign in with FB" works at LinkedIn Home page? 

Yeah, that is what we are trying to understand. 

 

Great, next shall I take any one of the lot as both are gonna be similar in terms of how it does and what it does.

So here I'm going to consider the "Sign in with google". Cool

 

So, Oauth is Open Standard Authorization ProtocolProtocol or Framework that provides applications the ability for Secure Designated Access. So, in our case at an high level, LinkedIn is given the access by Google to get basic info of the user like their name, age, and other few things. The access are not given by sharing the password. It is basically gives an authorization token to prove an identity between consumer and service provider. The reason of not sharing the password here is that once Li is breached, we can be happy that the password of our Google account will not be known to thr perpreators. 

 

So here me, Lokesh(User) wants LinkedIn (Consumer) to consume information from Google(Service Provider). Thus these are the 3 people involved in the Oauth process. 

Step1 :User shows Intent

Lokesh:User asks the consumer to collect/verify the details needed through Google. 

LinkedIn: Sure, I'll go get Permission

Step2: The consumer gets permission

LinkedIn: I have a user that would want me to check their basic details and open a account with me

Google: Awesome, here's a token and secret

The secret here is used to prevent request forgery.The consumer uses the secret to sign each request so that the service provider can verify that the request actually comes from the consumer application. 

Step3: The user is redirected to the Service Provider

LinkedIn: Okay, Lokesh. So im taking you to Google. Please approve the request using the token. 

Lokesh: Cool! 

Step4: The user gives permission

Lokesh: Google, I would like you to authorize this token that LinkedIn gave me. 

Google: okay, just to be sure, you want LinkedIn to access your Name, Age, Gender  with your Google account

Lokesh: Yup

Google: Okay, you can go back to LinkedIn and tell them they have the permission. 

 

Google will now mark the request as good to go. So when consumer aka LinkedIn requests access, it will be accepted

 

Step5: The Consumer Obtains an access token

LinkedIn: Google, Can I exchange  this req token for an access token

Google: sure, here's your access token and secret. 

Step6: The Consumer accesses thr Protected info

LinkedIn: I'd like to view the information. Here's my access token. 

Google: Here it is... 

So, in our scenario Lokesh never gave the credentials to LinkedIn. He simply delegates access using OAuth in a secured manner. At anytime Lokesh can log into Google, review the given access and can revoke it if needed. 

 

So this is how the OAuth functions and helps user share LinkedIn the needed information without sharing Password

 

Access expert answers by becoming a member
0 likes   |  
Get unlimited access for $12/month
Get access to 2,346 pm interview questions and answers to give yourself a strong edge against other candidates that are interviewing for the same position
Get access to over 238 hours of video material containing an interview prep course, recorded mock interviews by expert PMs, group practice sessions, and QAs with expert PMs
Boost your confidence in PM interviews by attending peer to peer mock interview practices, group practices, and QA sessions with expert PMs
Get unlimited access for $12/month
Get access to 2,346 pm interview questions and answers to give yourself a strong edge against other candidates that are interviewing for the same position
Get access to over 238 hours of video material containing an interview prep course, recorded mock interviews by expert PMs, group practice sessions, and QAs with expert PMs
Boost your confidence in PM interviews by attending peer to peer mock interview practices, group practices, and QA sessions with expert PMs