mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 16:17:21 +00:00
feat(auth): add GitHub provider for authentication and update Next.js config for remote images
This commit is contained in:
parent
8f2fa3b564
commit
3b654bafe3
@ -1,5 +1,14 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {};
|
||||
const nextConfig: NextConfig = {
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "avatars.githubusercontent.com",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import NextAuth from "next-auth";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import GitHub from "next-auth/providers/github";
|
||||
import { PrismaAdapter } from "@auth/prisma-adapter";
|
||||
|
||||
export const { handlers, signIn, signOut, auth } = NextAuth({
|
||||
adapter: PrismaAdapter(prisma),
|
||||
providers: [],
|
||||
providers: [GitHub],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user