Remove Apple SSO, keep Google + GitHub only

- Removed Apple from OAuth lib (config, exchange, provider type)
- Removed Apple button from auth page
- Removed Apple tab from setup guide page
- Removed Apple env vars from .env, .env.example, docker-compose.yml
- Removed Apple prompts from setup-sso.sh
This commit is contained in:
root
2026-06-15 14:36:46 +02:00
parent efe8fe36d4
commit b39bce91e4
7 changed files with 13 additions and 221 deletions
+3 -20
View File
@@ -8,19 +8,19 @@ import {
} from "@/lib/oauth";
import { signJWT } from "@/lib/auth";
const VALID_PROVIDERS = ["google", "apple", "github"];
const VALID_PROVIDERS = ["google", "github"];
async function handleCallback(
req: NextRequest,
provider: string
): Promise<NextResponse> {
try {
// Grab code and state from query params or POST body (Apple uses form_post)
// Grab code and state from query params or POST body
const url = new URL(req.url);
let code = url.searchParams.get("code");
let stateParam = url.searchParams.get("state");
// Apple may POST form data — try reading POST body
// Try reading POST body if code wasn't in query params
if (!code) {
try {
const contentType = req.headers.get("content-type") || "";
@@ -138,20 +138,3 @@ export async function GET(
}
return handleCallback(req, provider);
}
/** Apple OAuth may use form_post response_mode, which sends a POST. */
export async function POST(
req: NextRequest,
{ params }: { params: Promise<{ provider: string }> }
) {
const { provider } = await params;
if (!VALID_PROVIDERS.includes(provider)) {
return NextResponse.json(
{
error: `Unsupported provider. Must be one of: ${VALID_PROVIDERS.join(", ")}`,
},
{ status: 400 }
);
}
return handleCallback(req, provider);
}