diff --git a/app/[locale]/login/page.tsx b/app/[locale]/login/page.tsx index d5cd131..8c8b87e 100644 --- a/app/[locale]/login/page.tsx +++ b/app/[locale]/login/page.tsx @@ -47,7 +47,7 @@ const Page:FC = async () => {

{t("main-card.text-1")}

{t("main-card.text-2")}

- + { Object.values(providers).map((provider) => (
diff --git a/app/lib/auth.ts b/app/lib/auth.ts index 985194b..ef83f63 100644 --- a/app/lib/auth.ts +++ b/app/lib/auth.ts @@ -38,9 +38,22 @@ export const authConfig: NextAuthConfig = { clientId: process.env.GOOGLE_ID, clientSecret: process.env.GOOGLE_SECRET, }), + // config based on https://github.com/nextauthjs/next-auth/issues/8831 LinkedinProvider({ clientId: process.env.LINKEDIN_ID, clientSecret: process.env.LINKEDIN_SECRET, + authorization: { params: { scope: 'email openid' } }, + issuer: 'https://www.linkedin.com', + jwks_endpoint: "https://www.linkedin.com/oauth/openid/jwks", + async profile(profile) { + return { + id: profile.sub, + name: profile.name, + firstname: profile.given_name, + lastname: profile.family_name, + email: profile.email + } + }, }) ], secret: process.env.AUTH_SECRET, diff --git a/app/ui/SignInButton.tsx b/app/ui/SignInButton.tsx index 30ed47c..bc0f138 100644 --- a/app/ui/SignInButton.tsx +++ b/app/ui/SignInButton.tsx @@ -21,7 +21,7 @@ export const SignInButton:React.FC<{ provider: {id:string, name:string} }> = ({ const t = useTranslations("login-page"); return( -