Skip to content

Commit f639f79

Browse files
fix(tracking): only resolve signup product when callbackPath was explicitly provided (#1793)
* fix(tracking): only resolve signup product when callbackPath was explicitly provided * style: apply oxfmt formatting to after-sign-in route
1 parent 3f792a3 commit f639f79

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/app/users/after-sign-in/route.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ export async function GET(request: NextRequest) {
4949
// callbackPath query param, so the value cannot be user-tampered. This
5050
// runs exactly once per signup because has_validation_stytch is set
5151
// after account verification completes.
52-
const product = resolveSignupProduct(responsePath, !!url.searchParams.get('source'));
52+
const product = resolveSignupProduct(
53+
callbackPath && isValidCallbackPath(callbackPath) ? responsePath : null,
54+
!!url.searchParams.get('source')
55+
);
5356
if (product) {
5457
PostHogClient().capture({
5558
distinctId: user.google_user_email,

0 commit comments

Comments
 (0)