summaryrefslogtreecommitdiff
path: root/apps/web
diff options
context:
space:
mode:
authorfathisiddiqi <service.fathisiddiqi@gmail.com>2025-06-24 20:15:13 +0700
committerfathisiddiqi <service.fathisiddiqi@gmail.com>2025-06-26 09:33:47 +0700
commit6626a8c41355904e59ffd2598b6bfaa761a7ea15 (patch)
treee9fc8a11c562cea2bca519d44ff5d18e4eaf66ae /apps/web
parenta8d6bbd03a4c5a89075d75ea37b61afa5efe373a (diff)
downloadopencut-6626a8c41355904e59ffd2598b6bfaa761a7ea15.tar.gz
fix: set redirect uri for google login and prevent router push when login by google
Diffstat (limited to 'apps/web')
-rw-r--r--apps/web/.env.example1
-rw-r--r--apps/web/src/app/(auth)/login/page.tsx2
2 files changed, 2 insertions, 1 deletions
diff --git a/apps/web/.env.example b/apps/web/.env.example
index 0b4c649b..70c48e2a 100644
--- a/apps/web/.env.example
+++ b/apps/web/.env.example
@@ -10,6 +10,7 @@ BETTER_AUTH_SECRET=your-secret-key-here
#Google Clients
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
+GOOGLE_REDIRECT_URI=http://localhost:3000/api/auth/callback/google
# Development Environment
NODE_ENV=development
diff --git a/apps/web/src/app/(auth)/login/page.tsx b/apps/web/src/app/(auth)/login/page.tsx
index 73c34e1e..755784fa 100644
--- a/apps/web/src/app/(auth)/login/page.tsx
+++ b/apps/web/src/app/(auth)/login/page.tsx
@@ -52,8 +52,8 @@ function LoginForm() {
try {
await signIn.social({
provider: "google",
+ callbackURL: "/editor",
});
- router.push("/editor");
} catch (error) {
setError("Failed to sign in with Google. Please try again.");
setIsGoogleLoading(false);