I have embedded login with LinkedIn implemented and now I don’t have a clue how to exchange LinkedIn token with Auth0 to get credentials as I do get them in case of Sign in with Apple.
There used to be an SDK method “auth0.loginSocial” but cannot find it.
Can you please explain how I can achieve this?
You can use Auth0 to integrate with various social identity providers, such as LinkedIn, and get user credentials from them.
To exchange LinkedIn token with Auth0, you need to follow these steps:
Create a new application in the Auth0 dashboard and configure it for iOS and Swift.
Add LinkedIn as a social connection in the Auth0 dashboard and enter your API key and secret key from the LinkedIn developer portal.
Install the Auth0.swift package in your Xcode project using CocoaPods or Carthage.
Use the Auth0.webAuth() method to initiate the web-based authentication flow with LinkedIn. This will open a web view where the user can log in with their LinkedIn account and grant permissions to your app.
Handle the callback URL in your app delegate and use the Auth0.resumeAuth() method to resume the authentication flow. This will return an Credentials object that contains the access token, id token, and refresh token from Auth0.
Use the Auth0.authentication() method to get the user profile from Auth0 using the access token. This will return a UserInfo object that contains the user’s name, email, picture, and other attributes.