LinkedIn OAuth setup for Authverse projects
This page details how to add and configure LinkedIn OAuth for Authverse projects.
Execute the following command to add the LinkedIn provider to your project:
npx authverse@latest oauth LinkedInNavigate to the LinkedIn Developers portal (My Apps → [Your App] → Auth) and configure the Authorized Redirect URLs:
http://localhost:3000/api/auth/callback/LinkedInhttps://example.com/api/auth/callback/LinkedInAdd the following variables to your project's .env file:
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=Replace the values with the Client ID and Client Secret from your LinkedIn App.
[!TIP] Adjust this configuration to use your preferred method for securely storing secrets in CI/CD pipelines.
Import the prebuilt provider component and integrate it into your UI:
import LinkedInOAuthButton from "@/components/authverse/LinkedInOAuthButton";
<LinkedInOAuthButton />;This component renders the LinkedIn sign-in option at its location.
https://example.com with your authenticated domain.LinkedIn vs linkedin).