From 654a1463fc46db5d00895a98ce289d6f9b75d10c Mon Sep 17 00:00:00 2001 From: Tsahi Matsliah Date: Thu, 3 Sep 2026 15:08:56 +0300 Subject: [PATCH] feat(auth): add a signupEmail action that opens the registration form directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `?action=signup` maps to `AuthDisplay.Default`, which is right for a link that means "sign up": social buttons plus an email field. It is wrong for one that means "sign up WITH EMAIL", which is what the marketing homepage's hero now needs — that hero has its own provider buttons, so a visitor who presses "Continue with email" there is asked to choose all over again, and only after handing over an email a second time reaches the account-details form. `signupEmail` maps to `AuthDisplay.Registration`, so the link lands where the app's own "Continue with email" button lands. Two lines and a comment; the `Record` type makes the enum member and its mapping a pair, so this cannot be half-added. Nothing existing changes behaviour — `signup` still means what it meant. Consumed by dailydotdev/recruiter-landing, the homepage hero signup experiment. Co-Authored-By: Claude Opus 5 --- packages/shared/src/components/auth/common.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/shared/src/components/auth/common.tsx b/packages/shared/src/components/auth/common.tsx index 2ef80fdbd7a..0dafac3f161 100644 --- a/packages/shared/src/components/auth/common.tsx +++ b/packages/shared/src/components/auth/common.tsx @@ -85,6 +85,17 @@ export enum OnboardingActions { Login = 'login', Recover = 'recover', Signup = 'signup', + /** + * Straight to the account-details form, skipping the provider choice. + * + * `Signup` lands on `AuthDisplay.Default`, which offers the social buttons + * again alongside an email field — right for a link that means "sign up", + * wrong for one that means "sign up with email". The marketing homepage's + * hero has its own provider buttons and its own "Continue with email"; that + * button had no address to send anyone to, so it used `Signup` and asked the + * visitor to choose a second time. + */ + SignupEmail = 'signupEmail', VerifyEmail = 'verify', } @@ -93,6 +104,7 @@ export const actionToAuthDisplay: Record = { [OnboardingActions.Login]: AuthDisplay.Default, [OnboardingActions.Recover]: AuthDisplay.ForgotPassword, [OnboardingActions.Signup]: AuthDisplay.Default, + [OnboardingActions.SignupEmail]: AuthDisplay.Registration, [OnboardingActions.VerifyEmail]: AuthDisplay.EmailVerification, } as const;