feat: replace discord auth provider with github

This commit is contained in:
TOHAACK
2024-04-19 10:29:19 +02:00
parent ce85ce9924
commit cd67d9d335
3 changed files with 12 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ import {
type NextAuthOptions,
} from "next-auth";
import { type Adapter } from "next-auth/adapters";
import DiscordProvider from "next-auth/providers/discord";
import GitHubProvider from "next-auth/providers/github";
import { env } from "@/env";
import { db } from "@/server/db";
@@ -48,14 +48,14 @@ export const authOptions: NextAuthOptions = {
},
adapter: PrismaAdapter(db) as Adapter,
providers: [
DiscordProvider({
clientId: env.DISCORD_CLIENT_ID,
clientSecret: env.DISCORD_CLIENT_SECRET,
GitHubProvider({
clientId: env.GITHUB_CLIENT_ID,
clientSecret: env.GITHUB_CLIENT_SECRET,
}),
/**
* ...add more providers here.
*
* Most other providers require a bit more work than the Discord provider. For example, the
* Most other providers require a bit more work than the GITHUB provider. For example, the
* GitHub provider requires you to add the `refresh_token_expires_in` field to the Account
* model. Refer to the NextAuth.js docs for the provider you want to use. Example:
*