diff --git a/.env.example b/.env.example index 4eebc45..3f25deb 100644 --- a/.env.example +++ b/.env.example @@ -9,11 +9,6 @@ NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="generate-with: openssl rand -base64 32" AUTH_TRUST_HOST="true" # Set to true when behind a reverse proxy -# OAuth Providers -GOOGLE_CLIENT_ID="" -GOOGLE_CLIENT_SECRET="" -GITHUB_CLIENT_ID="" -GITHUB_CLIENT_SECRET="" # MinIO / S3-compatible storage MINIO_ENDPOINT="localhost" diff --git a/install.sh b/install.sh index 726a051..2e7c438 100644 --- a/install.sh +++ b/install.sh @@ -255,12 +255,6 @@ if [[ "$SKIP_CONFIG" == "false" ]]; then echo -e "${BOLD}AI Gateway:${NC}" prompt_value SWITCHBOARD_URL "Switchboard gateway URL" "http://192.168.2.11:8787/v1" - echo "" - echo -e "${BOLD}OAuth Providers (optional — press Enter to skip):${NC}" - prompt_value GOOGLE_CID "Google Client ID" "" - prompt_value GOOGLE_CS "Google Client Secret" "" - prompt_value GITHUB_CID "GitHub Client ID" "" - prompt_value GITHUB_CS "GitHub Client Secret" "" # Build DATABASE_URL DATABASE_URL="postgresql://${PG_USER}:${PG_PASSWORD}@localhost:5432/${PG_DB}" @@ -282,11 +276,6 @@ NEXTAUTH_URL="${APP_URL}" NEXTAUTH_SECRET="${AUTH_SECRET}" AUTH_TRUST_HOST="true" -# ─── OAuth Providers ───────────────────────────────────── -GOOGLE_CLIENT_ID="${GOOGLE_CID}" -GOOGLE_CLIENT_SECRET="${GOOGLE_CS}" -GITHUB_CLIENT_ID="${GITHUB_CID}" -GITHUB_CLIENT_SECRET="${GITHUB_CS}" # ─── MinIO / S3-compatible storage ─────────────────────── MINIO_ENDPOINT="localhost" @@ -418,7 +407,4 @@ echo -e " ${BOLD}${YELLOW}Next steps:${NC}" echo " 1. Open ${APP_URL_CHECK} and create your account" echo " 2. Add your Switchboard API key in Settings" echo " 3. Set up a reverse proxy (nginx/Caddy) for HTTPS" -if [[ -z "${GOOGLE_CID:-}" ]] && [[ -z "${GITHUB_CID:-}" ]]; then - echo " 4. (Optional) Add OAuth providers in $ENV_FILE" -fi echo "" diff --git a/src/app/(auth)/login/page.tsx b/src/app/(auth)/login/page.tsx index d422895..680b4e1 100644 --- a/src/app/(auth)/login/page.tsx +++ b/src/app/(auth)/login/page.tsx @@ -8,7 +8,6 @@ import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" -import { Separator } from "@/components/ui/separator" export default function LoginPage() { const [email, setEmail] = useState("") @@ -93,50 +92,6 @@ export default function LoginPage() { -
Don't have an account?{" "} diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 59aee2b..3222a71 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -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: {