Repository navigation
feat(profile): signup profile fields via @profullstack/profile - #57
Merged
Merged
Conversation
"New to readm3? Create an account" on /account adds first name, last name, company domain, job title and LinkedIn URL to the email form (@profullstack/profile 0.1.3, rendered at build time; the company-from-work-email helper is served as a file for the strict CSP). /api/auth/email validates them before any link is sent and keeps them on the email challenge; verify saves them to user_profiles once the account exists, and a failed save never blocks sign-in. Plain sign-in and CoinPay never ask for them. GET/PUT/PATCH /api/v1/me/profile serves the package handlers for the session user, and the account panel edits the same fields. user_profiles is created by migrate() when the database opens; display names typed as "First Last" are backfilled with fillBlanks (handles and email local parts are skipped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…e file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopts the shared @profullstack/profile 0.1.3 (Anthony 2026-10-26: one profile stack for every property).
readm3 signup is the email magic link on
/account(the survey's username/password note was stale), so this follows the tipoffwatch.com #118 pattern:renderProfileFieldsat build time, without email; the fieldset is disabled while hidden so plain sign-in is never blocked).PROFILE_ENHANCE_SCRIPTis a built asset because the account page CSP allows no inline script./api/auth/emailwithmode: "signup"runsvalidateProfilebefore any link is sent (400 witherrors), stores the validated fields onemail_challenges.profile(new column, added idempotently), and/api/auth/verifycallssaveSignupProfileonce the user exists. A failed save never blocks sign-in.user_profiles(keyuser_idtext), created bymigrate()when the DB opens (server/profile.ts), like the rest of the in-code schema. Backfill: display names typed as "First Last" fill blank names viafillBlanks; single words and email local parts (the default display name) are skipped.GET/PUT/PATCH /api/v1/me/profileviacreateProfileHandlerswith the session user; the account panel edits the same fields (GET prefill, PATCH save).server/test/profile.test.ts(signup stores all six after verify; missing name refused with no link sent; plain sign-in stores nothing; API 401 without session).Local:
bun test ./server/test101/101,npm test225/225, typecheck clean; site build renders the fields on /account.🤖 Generated with Claude Code