The open-source CapCut alternative
refactor: remove google auth
Maze Winthercb877769fba8
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.mdindex 2f28b36b..995dbf19 100644--- a/.github/CONTRIBUTING.md+++ b/.github/CONTRIBUTING.md@@ -86,14 +86,6 @@ Thank you for your interest in contributing to OpenCut! This document provides g# Or use an online generator: https://generate-secret.vercel.app/32```- **Optional Variables (for Google OAuth):**-- ```bash- # Only needed if you want to test Google login- GOOGLE_CLIENT_ID="your-google-client-id"- GOOGLE_CLIENT_SECRET="your-google-client-secret"- ```-5. Run database migrations: `bun run db:migrate`6. Start the development server: `bun run dev`diff --git a/README.md b/README.mdindex dcc6ca75..6d3937a7 100644--- a/README.md+++ b/README.md@@ -124,14 +124,6 @@ Before you begin, ensure you have the following installed on your system:# Or use an online generator: https://generate-secret.vercel.app/32```- **Optional Variables (for Google OAuth):**-- ```bash- # Only needed if you want to test Google login- GOOGLE_CLIENT_ID="your-google-client-id"- GOOGLE_CLIENT_SECRET="your-google-client-secret"- ```-5. Run database migrations: `bun run db:migrate` from (inside apps/web)6. Start the development server: `bun run dev` from (inside apps/web)diff --git a/apps/web/.env.example b/apps/web/.env.exampleindex 834171a0..d63df851 100644--- a/apps/web/.env.example+++ b/apps/web/.env.example@@ -7,10 +7,6 @@ DATABASE_URL="postgresql://opencut:opencutthegoat@localhost:5432/opencut"NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3000BETTER_AUTH_SECRET=your-secret-key-here-#Google Clients-GOOGLE_CLIENT_ID=-GOOGLE_CLIENT_SECRET=-# Development EnvironmentNODE_ENV=developmentdiff --git a/bun.lock b/bun.lockindex 661b9b1d..7a39856d 100644--- a/bun.lock+++ b/bun.lock@@ -22,6 +22,8 @@"@hookform/resolvers": "^3.9.1","@opencut/auth": "workspace:*","@opencut/db": "workspace:*",+ "@t3-oss/env-core": "^0.13.8",+ "@t3-oss/env-nextjs": "^0.13.8","@upstash/ratelimit": "^2.0.5","@upstash/redis": "^1.35.0","@vercel/analytics": "^1.4.1",@@ -76,7 +78,9 @@"version": "0.0.0","dependencies": {"@opencut/db": "workspace:*",+ "@t3-oss/env-nextjs": "^0.13.8","better-auth": "^1.1.1",+ "zod": "^4.0.5",},"devDependencies": {"@types/node": "^22.10.2",@@ -86,8 +90,10 @@"name": "@opencut/db","version": "0.0.0","dependencies": {+ "@t3-oss/env-nextjs": "^0.13.8","drizzle-orm": "^0.44.2","postgres": "^3.4.5",+ "zod": "^4.0.5",},"devDependencies": {"@types/pg": "^8.11.10",@@ -415,6 +421,10 @@"@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g=="],+ "@t3-oss/env-core": ["@t3-oss/[email protected]", "", { "peerDependencies": { "arktype": "^2.1.0", "typescript": ">=5.0.0", "valibot": "^1.0.0-beta.7 || ^1.0.0", "zod": "^3.24.0 || ^4.0.0-beta.0" }, "optionalPeers": ["arktype", "typescript", "valibot", "zod"] }, "sha512-L1inmpzLQyYu4+Q1DyrXsGJYCXbtXjC4cICw1uAKv0ppYPQv656lhZPU91Qd1VS6SO/bou1/q5ufVzBGbNsUpw=="],++ "@t3-oss/env-nextjs": ["@t3-oss/[email protected]", "", { "dependencies": { "@t3-oss/env-core": "0.13.8" }, "peerDependencies": { "arktype": "^2.1.0", "typescript": ">=5.0.0", "valibot": "^1.0.0-beta.7 || ^1.0.0", "zod": "^3.24.0 || ^4.0.0-beta.0" }, "optionalPeers": ["arktype", "typescript", "valibot", "zod"] }, "sha512-QmTLnsdQJ8BiQad2W2nvV6oUpH4oMZMqnFEjhVpzU0h3sI9hn8zb8crjWJ1Amq453mGZs6A4v4ihIeBFDOrLeQ=="],+"@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": "1.2.18" } }, "sha512-Xf6RaWVheyemaThV0kUfaAUvCNokFr+bH8Jxp+tTZfx7dAPA8z9ePnP9S9+Vspzuxxx9JRAXhnyccRj3GyCMdQ=="],"@types/d3-array": ["@types/[email protected]", "", {}, "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg=="],@@ -1075,7 +1085,7 @@"yaml": ["[email protected]", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ=="],- "zod": ["[email protected]", "", {}, "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw=="],+ "zod": ["[email protected]", "", {}, "sha512-/5UuuRPStvHXu7RS+gmvRf4NXrNxpSllGwDnCBcJZtQsKrviYXm54yDGV2KYNLT5kq0lHGcl7lqWJLgSaG+tgA=="],"zustand": ["[email protected]", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-mILtRfKW9xM47hqxGIxCv12gXusoY/xTSHBYApXozR0HmQv299whhBeeAcRy+KrPPybzosvJBCOmVjq6x12fCg=="],@@ -1085,6 +1095,8 @@"@types/bun/bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-04+Eha5NP7Z0A9YgDAzMk5PHR16ZuLVa83b26kH5+cp1qZW4F6FmAURngE7INf4tKOvCE69vYvDEwoNl1tGiWw=="],+ "better-auth/zod": ["[email protected]", "", {}, "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw=="],+"chokidar/glob-parent": ["[email protected]", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],"fast-glob/glob-parent": ["[email protected]", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],@@ -1093,6 +1105,8 @@"next/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],+ "opencut/zod": ["[email protected]", "", {}, "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw=="],+"parse-entities/@types/unist": ["@types/[email protected]", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],"prop-types/react-is": ["[email protected]", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],diff --git a/docker-compose.yaml b/docker-compose.yamlindex 1bce8507..40e22339 100644--- a/docker-compose.yaml+++ b/docker-compose.yaml@@ -60,8 +60,6 @@ services:- BETTER_AUTH_SECRET=your-production-secret-key-here- UPSTASH_REDIS_REST_URL=http://serverless-redis-http:80- UPSTASH_REDIS_REST_TOKEN=example_token- - GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}- - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}depends_on:db:condition: service_healthydiff --git a/packages/auth/src/keys.ts b/packages/auth/src/keys.tsindex 919eaccb..5dfaf0ea 100644--- a/packages/auth/src/keys.ts+++ b/packages/auth/src/keys.ts@@ -5,8 +5,6 @@ export const keys = () =>createEnv({server: {BETTER_AUTH_SECRET: z.string(),- GOOGLE_CLIENT_ID: z.string(),- GOOGLE_CLIENT_SECRET: z.string(),},client: {NEXT_PUBLIC_BETTER_AUTH_URL: z.string().url(),@@ -14,7 +12,5 @@ export const keys = () =>runtimeEnv: {NEXT_PUBLIC_BETTER_AUTH_URL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL,BETTER_AUTH_SECRET: process.env.BETTER_AUTH_SECRET,- GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,- GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET,},});diff --git a/packages/auth/src/server.ts b/packages/auth/src/server.tsindex 5872962c..71200533 100644--- a/packages/auth/src/server.ts+++ b/packages/auth/src/server.ts@@ -3,7 +3,7 @@ import { drizzleAdapter } from "better-auth/adapters/drizzle";import { db } from "@opencut/db";import { keys } from "./keys";-const { NEXT_PUBLIC_BETTER_AUTH_URL, BETTER_AUTH_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET } = keys()+const { NEXT_PUBLIC_BETTER_AUTH_URL, BETTER_AUTH_SECRET } = keys()export const auth = betterAuth({database: drizzleAdapter(db, {@@ -19,12 +19,6 @@ export const auth = betterAuth({emailAndPassword: {enabled: true,},- socialProviders: {- google: {- clientId: GOOGLE_CLIENT_ID,- clientSecret: GOOGLE_CLIENT_SECRET,- },- },baseURL: NEXT_PUBLIC_BETTER_AUTH_URL,appName: "OpenCut",trustedOrigins: ["http://localhost:3000"],