Merge pull request #22 from DeepanshuMishraa/changes

Added google auth and some auth page ui optimisations
This commit is contained in:
Maze
2025-06-23 19:58:54 +02:00
committed by GitHub
7 changed files with 254 additions and 83 deletions

View File

@ -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!,
});

View File

@ -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"],
});