nowaythatworked / auth-astro

Community maintained Astro integration of @auth/core
290 stars 43 forks source link

Problem with Linkedin Provider #32

Open krankos opened 1 year ago

krankos commented 1 year ago

When using the Linkedin Provider the auth fails with error 'Client authentication failed'

link to repo: repo link to deploy: deploy

rogered1320 commented 1 year ago

I have the same problem, does anyone know of a solution to temporarily fix this?

davinun99 commented 5 months ago

Also Having problems with linkedin, any solutions for this?

davinun99 commented 5 months ago

fixed with this on my auth.config.js:

import Linkedin from "@auth/core/providers/linkedin";
import { defineConfig } from "auth-astro";

export default defineConfig({
    providers: [
        Linkedin({
            clientId: import.meta.env.LINKEDIN_CLIENT_ID,
            clientSecret: import.meta.env.LINKEDIN_CLIENT_SECRET,
            issuer: "https://www.linkedin.com/oauth",
            jwks_endpoint: "https://www.linkedin.com/oauth/openid/jwks",
            authorization: { params: { scope: "profile email openid" } },
            async profile(profile) {
                return {
                    id: profile.sub,
                    name: profile.name,
                    firstname: profile.given_name,
                    lastname: profile.family_name,
                    email: profile.email,
                };
            },
        }),
    ],
    debug: true,
});