summaryrefslogtreecommitdiff
path: root/apps/web/src/lib
diff options
context:
space:
mode:
authorMaze <167211895+mazeincoding@users.noreply.github.com>2025-06-23 19:58:54 +0200
committerGitHub <noreply@github.com>2025-06-23 19:58:54 +0200
commitc691835d855f313303e9f4626dd90fa1f76e9c5e (patch)
tree5adcb9ba1956d51fb0f48abeee9a308dde11d3da /apps/web/src/lib
parent459b530aee414fa3bb475de7d83a512a00c2e9d3 (diff)
parent8bcd226bdb4eb3468df0590dbe6d3d8d68b2acbd (diff)
downloadopencut-c691835d855f313303e9f4626dd90fa1f76e9c5e.tar.gz
Merge pull request #22 from DeepanshuMishraa/changes
Added google auth and some auth page ui optimisations
Diffstat (limited to 'apps/web/src/lib')
-rw-r--r--apps/web/src/lib/auth-client.ts2
-rw-r--r--apps/web/src/lib/auth.ts6
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/web/src/lib/auth-client.ts b/apps/web/src/lib/auth-client.ts
index 7c467e7e..1ab4e636 100644
--- a/apps/web/src/lib/auth-client.ts
+++ b/apps/web/src/lib/auth-client.ts
@@ -1,4 +1,4 @@
import { createAuthClient } from "better-auth/react";
-export const authClient = createAuthClient({
+export const { signIn, signUp, useSession } = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL!,
});
diff --git a/apps/web/src/lib/auth.ts b/apps/web/src/lib/auth.ts
index 4cfaa6f2..d0175c97 100644
--- a/apps/web/src/lib/auth.ts
+++ b/apps/web/src/lib/auth.ts
@@ -16,6 +16,12 @@ export const auth = betterAuth({
emailAndPassword: {
enabled: true,
},
+ socialProviders: {
+ google: {
+ clientId: process.env.GOOGLE_CLIENT_ID as string,
+ clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
+ },
+ },
appName: "OpenCut",
trustedOrigins: ["http://localhost:3000"],
});