mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
* docs: add Gatsby example, move Next.js example * chore: fix sync action * docs(example): fix README link
32 lines
856 B
JavaScript
32 lines
856 B
JavaScript
import GitHubProvider from "next-auth/providers/github"
|
|
import CredentialsProvider from "next-auth/providers/credentials"
|
|
|
|
/** @type {import("next-auth").NextAuthOptions} */
|
|
export const authConfig = {
|
|
providers: [
|
|
CredentialsProvider({
|
|
credentials: {
|
|
Password: { placeholder: `type "password"`, type: "password" },
|
|
},
|
|
authorize(credentials) {
|
|
if (credentials.Password === "password") {
|
|
return {
|
|
name: "John Doe",
|
|
email: "john@doe.com",
|
|
image: "https://www.fillmurray.com/200/200",
|
|
}
|
|
}
|
|
},
|
|
}),
|
|
GitHubProvider({
|
|
clientId: process.env.GITHUB_ID,
|
|
clientSecret: process.env.GITHUB_SECRET,
|
|
}),
|
|
],
|
|
theme: {
|
|
logo: "https://www.gatsbyjs.com/Gatsby-Monogram.svg",
|
|
colorScheme: "light",
|
|
brandColor: "#663399",
|
|
},
|
|
}
|