Skip to content

Fetch google, Facebook, apple access token from backend

Notifications You must be signed in to change notification settings

kh77/social-login-by-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validate Social login token at back-end and get profile information

Social Login (IOS, Google, Facebook)

-- Linkedin

  • https://www.linkedin.com/developers

  • Get client id and secret

  • Hit below url to get code and use this code in request body for token field

  • https://www.linkedin.com/oauth/v2/authorization?client_id=helloworld&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fhome&response_type=code&state=abcdef&scope=r_liteprofile%20r_emailaddress

  • No playground has been found for linkedin

  • Swagger

  • For Facebook

    • Request body
      • { "provider": "facebook", "token": " Get access token from Playground " }
  • For Google

    • Request body
      • { "provider": "google", "token": " Get id token from Playground " }
  • For Linkedin

    • Request body
      • { "provider": "linkedin", "token": " Get authorization code" }
  • For Apple :

    • We need authorization code to validate on it.
    • We are passing the values of firstName and lastName because when we get authorization code that time user-info will be provided after that only email will be received. This is current behaviour in APPLE doc.
    • Request body
      • { "firstName" : "Hello" "lastName" : "World" "provider" : "apple", "token" : "Get authorization code. It will be used only one time to validate and get the user information" }
  • Important class and points

    • SocialClient.java

      • google and facebook api to get user info
    • IOSConfig.java

      • 4 properties we need from apple developer project
    • IOSClient.java

      • get apple user info

Releases

No releases published

Packages

No packages published

Languages