Remove Google and GitHub sign-in

Both providers were registered but never usable: all four client
env vars are empty in production and no Account row has ever been
created. Email and password is the only path that has ever worked.

This also simplifies the invite gating that follows. With OAuth there
were two redemption paths, an invite token that had to survive the
provider round trip in a SameSite=Lax cookie, and an
OAuthAccountNotLinked dead end for anyone who signed up with a password
and later clicked a provider button. Now there is one path.

Account, Session and VerificationToken stay in the schema. They are
Auth.js's tables and dropping them would be a destructive migration for
no benefit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
JP
2026-08-08 20:42:40 +00:00
parent b3a0cc75eb
commit f0c745c50c
4 changed files with 4 additions and 74 deletions

View File

@@ -1,6 +1,4 @@
import NextAuth from "next-auth"
import Google from "next-auth/providers/google"
import GitHub from "next-auth/providers/github"
import Credentials from "next-auth/providers/credentials"
import { PrismaAdapter } from "@auth/prisma-adapter"
import { prisma } from "@/lib/prisma"
@@ -13,15 +11,11 @@ import { rateLimit } from "@/lib/rate-limit"
*/
const PUBLIC_ROUTES = ["/login", "/register", "/share"]
// Email and password only. Google and GitHub were configured but never had
// credentials set and no account ever linked to them, and dropping them keeps
// invite redemption to a single path - no carrying an invite token through an
// OAuth round trip, and no OAuthAccountNotLinked dead end for members.
const providers = [
Google({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
GitHub({
clientId: process.env.GITHUB_CLIENT_ID,
clientSecret: process.env.GITHUB_CLIENT_SECRET,
}),
Credentials({
name: "Email",
credentials: {