Sign Up With LinkedIn
Sign In with LinkedIn enables users to sign in to Apps using their LinkedIn accounts.
To complete this tutorial, you will need:
- An app created at Back4App
- Set up a Subdomain for your Back4app app
First of all, it’s necessary to make sure that you have an existing app created at Back4App. However, if you are a new user, you can check this tutorial to learn how to create one.
Log into your LinkedIn Developer account click Create App and choose OAuth client ID
Choose an App name and fill in the required fields such as Business email and App logo. Agree to the terms and click Create app
In your newly created App, click Verify to verify the ownership of the App. You must be the owner or administrator of the LinkedIn page to verify.
In the Verification page, click Generate URL
Visit the generated Verification URL using the admin or owner account of the company’s page on LinkedIn.
Click on Approve Verification
Make sure your App is verified
In your App, go to the Auth tab, fill in the Redirect URLs field, and click Update
Visit the following URL, changing the values for CLIENT_ID, REDIRECT_URL, and A_RANDOM_STRING for the ones you created. The random string is to avoid CSRF attacks.
Log in with your LinkedIn account and the redirected website will have your code in the URL:
Copy the Code part of the URL only and run the following CURL command replacing the values YOUR_CODE, YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, and YOUR_REDIRECT_URI for the values of your application
Run it and you should retrieve your access token:
REMEMBER: the code can be used only once. If you get an error or don’t use your token, you must re-generate your Code to be able to run it again.
Now that the Sign-in with LinkedIn is configured, you can start the development process. The format for AUTHDATA is:
Here is the method for the iOS SDK:
And here for the Android SDK: