Repository navigation
fix(auth): password sign-up shows check-email, never expects a session (planning#2284) - #53
Conversation
…n (planning#2284)
|
Review complete. 🟡 2 medium 📍 Findings outside the diff (2) — 🟡 2 medium — defects on lines GitHub can't attach comments to🟡 Medium — Sheets sign-up success gives the user no feedback · register-form.tsx:34–41 · // packages/sheets/src/auth/ui/register-form.tsx
34 try {
35 const validatedData = registerSchema.parse(value);
36 await onRegister(validatedData);
37 } catch (err) {
38 setError(parseGraphQLError(err).message);
39 } finally {
40 setIsSubmitting(false);
41 }Sign-up no longer signs the user in ( 🟡 Medium — Vendor bundle still ships the old signUp flow · index.js:100327–100333 · // packages/sheets/dist-vendor/index.js
100327 rememberMe: formData.rememberMe ?? true
100328 }
100329 }
100330 );
100331 const signUpResult = result.signUp?.result;
100332 const token = signUpResult ? toAuthToken(signUpResult) : null;
100333 return { token, email: formData.email, identityKey: signUpResult?.userId ?? null };The committed vendor bundle 🧹 Nitpicks (1) — 🟢 1 low
This PR converts sign-up from an auto-login flow to a check-your-email flow: the
Reviewed commit: c823486 |
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Summary
Client half of constructive-planning#2284, pairs with constructive-io/constructive-db#4086. Password
signUpnow returns nothing and never signs anyone in. The tenant mails a one-time sign-in link to/auth/magic, and a fresh address and a taken one get the same answer.packages/sheetsuseRegister: selects onlyclientMutationId, sends{ email, password }, stores no token, and returns{ email }. Remember-me is removed fromRegisterFormand its schema.console-runtime/standalone-session:signUpresolves{ status: 'check-email' }and the snapshot stays anonymous.signInis unchanged.feature-packs/auth/auth-entry-panel: sign-up shows "Check your email…" instead of callingonAuthenticated.e2e-live/constructive-graphql.ts: the helper signs up, then signs in.Evidence:
tsc --noEmitis clean inapps/blocksandpackages/sheets.packages/sheetsvitest: 369 passed.apps/blocksconsole-runtime + feature-packs/auth: 50 passed.packages/sheets/dist-vendoris not rebuilt here. Rebuilding it locally rewrites about 200k lines from dependency drift, so it's left for the release build.Merge after constructive-io/constructive-db#4086 is deployed.
Written by Devin
Open in Devin Desktop: https://app.devin.ai/desktop/session/c288d2e1eb6d40f3b313b4e6a39de289?variant=devin
Requested by: @pyramation