This app showcases the power of using Descope to manage your provider tokens. ⚡ Use Descope to log in using LinkedIn OAuth, and utilize the LinkedIn provider token and APIs to create a new LinkedIn post.
Follow these steps to clone the repository and start using the app.
- An account on Descope.
- A LinkedIn Provider Application.
You will have to connect your own LinkedIn Provider Application in Descope to manage Provider tokens.
- First, if you do not already have one, create a LinkedIn Provider Application here.
- Under the Products tab on your LinkedIn Provider Application, request access to "Share on LinkedIn" and "Sign In with LinkedIn using OpenID Connect".
- Connect the application to Descope by choosing Linkedin under the Authentication Methods page in the Descope Console. Choose "use my own account" and enter your
Client ID
andClient Secret
found under the Auth tab on your Linkedin Provider Application. Underscopes
add "w_member_social", and underAdvanced Settings
enable "Manage tokens from provider."
Start by cloning the repository to your local machine:
git clone https://github.com/descope-sample-apps/linkedin-sample-app.git
cd linkedin-sample-app
Navigate to the project directory and install the necessary dependencies:
npm i
npm install @descope/nextjs-sdk
Before you run the app, make sure to configure the following:
- Environment Variables: Set up your environment variables in a
.env.local
file. You'll need to include your Descope project settings:
####### Descope ENV Variables
NEXT_PUBLIC_DESCOPE_PROJECT_ID="" // Descope Project ID
NEXT_PUBLIC_DESCOPE_FLOW_ID="" // Descope flow to use on Sign In Page. Make sure the flow includes signing in using LinkedIn OAuth.
DESCOPE_MANAGEMENT_KEY="" // Your Descope Management Key
Once you've configured your app, you're ready to run it:
npm run dev
This command starts the Next.js development server, making your app accessible at http://localhost:3000.
If you encounter any issues or have questions, consult the Descope documentation, or reach out to our support for assistance.
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have suggestions or improvements.
This sample app is open-source and available under the MIT License. See the LICENSE file for more details.