// auth.tsimport NextAuth from "next-auth"import GitHub from "next-auth/providers/github"export const { auth, handlers } = NextAuth({ providers: [GitHub] })// middleware.tsexport { auth as middleware } from "@/auth"// app/api/auth/[...nextauth]/route.tsimport { handlers } from "@/auth"export const { GET, POST } = handlers
// src/auth.tsimport { SvelteKitAuth } from "@auth/sveltekit"import GitHub from '@auth/sveltekit/providers/github'export const { handle } = SvelteKitAuth({ providers: [GitHub],})// src/hooks.server.tsexport { handle } from "./auth"
// server.tsimport { express } from "express"import { ExpressAuth } from "@auth/express"import GitHub from "@auth/express/providers/github"const app = express()app.use("/auth/*", ExpressAuth({ providers: [GitHub] }))
// src/routes/plugin@auth.tsimport { QwikAuth } from "@auth/qwik"import GitHub from "@auth/qwik/providers/github"export const { onRequest, useSession } = QwikAuth$(() => ({ providers: [GitHub] }))
Supports all these providers and more!