Skip to content

Commit cc005e5

Browse files
committed
fix(auth): use exact path match for duplicate-email signup check
1 parent 2261379 commit cc005e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/lib/auth/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ export const auth = betterAuth({
844844
}
845845
}
846846

847-
if (ctx.path.startsWith('/sign-up/email') && ctx.body?.email) {
847+
if (ctx.path === '/sign-up/email' && ctx.body?.email) {
848848
const signupEmail = ctx.body.email.toLowerCase()
849849
const [existingUser] = await db
850850
.select({ id: schema.user.id })

0 commit comments

Comments
 (0)