Skip to content

feat: shared profile fields on signup (@profullstack/profile) - #26

Merged
ralyodio merged 1 commit into
masterfrom
feat/profile-fields
Oct 26, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/profile-fields

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Adopts @profullstack/profile 0.1.2 for the signup profile: email, first_name, last_name (required), company_domain, job_title, linkedin_url (optional).

  • /signup (new, same SPA shell): the sign-in form in signup mode with the package's fields. Plain /signin is unchanged and never asks for them (it still creates an account for a new address).
  • Server: /api/v1/auth/link with mode: "signup" runs validateProfile before any link exists (400 with field errors); the validated fields ride on login_tokens.profile and are saved with saveSignupProfile when the link is spent. A failed save never blocks sign-in.
  • API: GET/PUT/PATCH /api/v1/me/profile via mountProfileRoutes. Settings has a Contact details card (prefilled from GET, saved with PATCH).
  • Migration 0007 (runs on boot): user_profiles (package DDL, uuid key), login_tokens.profile jsonb, idempotent backfill of first/last from users.name (prod has one named user, a real name).
  • Field markup is the package's renderProfileFields, served in the shell as a <template>; the company-from-work-email helper is served at /assets/profile.js. SW cache bumped to v6.
  • Tests: test/signup-profile.test.js (refusal before a link, plain sign-in untouched, fields saved on verify, 401). Full suite 126/126 against local Postgres 16.

🤖 Generated with Claude Code

The signup form (/signup) asks for first and last name (required) and
company domain, job title and LinkedIn (optional), from
@profullstack/profile 0.1.2. Plain sign-in is unchanged and never asks.

- Validated on /api/v1/auth/link in signup mode before any link exists;
  carried on login_tokens.profile and saved to user_profiles when the link
  is spent. A failed save never blocks sign-in.
- GET/PUT/PATCH /api/v1/me/profile via mountProfileRoutes; Settings gets a
  Contact details card.
- Migration 0007: user_profiles (package DDL), login_tokens.profile, and an
  idempotent backfill of first/last name from users.name.
- Field markup is the package's, served in the shell as a <template>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​profile@​0.1.27610010091100

View full report

@ralyodio
ralyodio merged commit cf7bc9a into master Oct 26, 2026
3 checks passed
@ralyodio
ralyodio deleted the feat/profile-fields branch October 26, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant