supported login via linkedin
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import NextAuth, { NextAuthConfig } from 'next-auth';
|
||||
import GoogleProvider from 'next-auth/providers/google';
|
||||
import LinkedinProvider from 'next-auth/providers/linkedin';
|
||||
import { Session } from 'next-auth';
|
||||
import { AuthenticatedUser } from './types/next-auth';
|
||||
import { defaultLocale } from '../i18n';
|
||||
@@ -37,6 +38,10 @@ export const authConfig: NextAuthConfig = {
|
||||
clientId: process.env.GOOGLE_ID,
|
||||
clientSecret: process.env.GOOGLE_SECRET,
|
||||
}),
|
||||
LinkedinProvider({
|
||||
clientId: process.env.LINKEDIN_ID,
|
||||
clientSecret: process.env.LINKEDIN_SECRET,
|
||||
})
|
||||
],
|
||||
secret: process.env.AUTH_SECRET,
|
||||
trustHost: true, // needs to be set to false for the NextJS to work behing Traefik
|
||||
|
||||
@@ -11,6 +11,7 @@ const providerLogo = (provider: {id:string, name:string}) => {
|
||||
case "github": return "https://authjs.dev/img/providers/github.svg";
|
||||
case "twitter": return "https://authjs.dev/img/providers/twitter.svg";
|
||||
case "email": return "https://authjs.dev/img/providers/email.svg";
|
||||
case "linkedin": return "https://authjs.dev/img/providers/linkedin.svg";
|
||||
default: return "https://authjs.dev/img/providers/google.svg";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user