Fix auth redirect to use session email instead of hardcoded workspace

New users were being sent to /marks-account/projects. Now derives
workspace from the signed-in user's email so everyone lands on
their own workspace after Google OAuth.

Made-with: Cursor
This commit is contained in:
2026-03-16 21:39:19 -07:00
parent 63dded42a6
commit 317abf047b
2 changed files with 10 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ export default function NextAuthComponent() {
try {
// Sign in with Google using NextAuth
await signIn("google", {
callbackUrl: "/marks-account/projects",
callbackUrl: "/auth",
});
} catch (error) {
console.error("Google sign-in error:", error);