Welcome!
57 | {!isAuthenticated && ( 58 |71 |
2 |
3 |
4 | # LinkedIn + Descope Next.js Sample App
5 |
6 | This app showcases the power of using Descope to manage your provider tokens. :zap: Use Descope to log in using LinkedIn OAuth, and utilize the LinkedIn provider token and APIs to create a new LinkedIn post.
7 |
8 | ## Getting Started 🚀
9 |
10 | Follow these steps to clone the repository and start using the app.
11 |
12 | ### Prerequisites
13 |
14 | - An account on [Descope](https://descope.com/).
15 | - A [LinkedIn Provider Application](https://www.linkedin.com/developers/apps).
16 |
17 | ### LinkedIn Provider Application Setup
18 |
19 | You will have to connect your own LinkedIn Provider Application in Descope to manage Provider tokens.
20 |
21 | - First, if you do not already have one, create a LinkedIn Provider Application [here](https://www.linkedin.com/developers/apps).
22 | - Under the Products tab on your LinkedIn Provider Application, request access to "Share on LinkedIn" and "Sign In with LinkedIn using OpenID Connect".
23 | - Connect the application to Descope by choosing Linkedin under the [Authentication Methods page](https://app.descope.com/settings/authentication/social) in the Descope Console. Choose "use my own account" and enter your `Client ID` and `Client Secret` found under the Auth tab on your Linkedin Provider Application. Under `scopes` add "w_member_social", and under `Advanced Settings` enable "Manage tokens from provider."
24 |
25 |
26 |
27 | ### Clone the Repository
28 |
29 | Start by cloning the repository to your local machine:
30 |
31 | ```bash
32 | git clone https://github.com/descope-sample-apps/linkedin-sample-app.git
33 | cd linkedin-sample-app
34 | ```
35 |
36 | ### Install Dependencies
37 |
38 | Navigate to the project directory and install the necessary dependencies:
39 |
40 | ```bash
41 | npm i
42 | npm install @descope/nextjs-sdk
43 | ```
44 |
45 | ### Configuration
46 |
47 | Before you run the app, make sure to configure the following:
48 |
49 | - **Environment Variables**: Set up your environment variables in a `.env.local` file. You'll need to include your Descope project settings:
50 |
51 | ```
52 | ####### Descope ENV Variables
53 | NEXT_PUBLIC_DESCOPE_PROJECT_ID="" // Descope Project ID
54 | NEXT_PUBLIC_DESCOPE_FLOW_ID="" // Descope flow to use on Sign In Page. Make sure the flow includes signing in using LinkedIn OAuth.
55 | DESCOPE_MANAGEMENT_KEY="" // Your Descope Management Key
56 | ```
57 |
58 | ### Running the App
59 |
60 | Once you've configured your app, you're ready to run it:
61 |
62 | ```bash
63 | npm run dev
64 | ```
65 |
66 | This command starts the Next.js development server, making your app accessible at [http://localhost:3000](http://localhost:3000).
67 |
68 | ## Support :raised_hands:
69 |
70 | If you encounter any issues or have questions, consult the Descope documentation, or reach out to our [support](https://www.descope.com/contact) for assistance.
71 |
72 | - [Descope Documentation](https://docs.descope.com/)
73 |
74 | ## Contributing
75 |
76 | Contributions are welcome! Please feel free to submit a pull request or open an issue if you have suggestions or improvements.
77 |
78 | ## License
79 |
80 | This sample app is open-source and available under the MIT License. See the LICENSE file for more details.
81 |
--------------------------------------------------------------------------------
/cypress/support/commands.ts:
--------------------------------------------------------------------------------
1 | ///