You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Frontend for the legacy first-login onboarding gate. Legacy nemar.org users (imported with name + email only) sign in via the existing email-PIN flow, then must link a verified ORCID before reaching the dashboard.
This is the email-first mirror of the ORCID-first onboarding in #128. Pairs with the backend in nemarOrg/nemar-cli#833. Builds on #128 (ORCID button + link route) and reuses the passwordless flow already shipped. Related: #44 (net-new web signup).
Decisions (locked)
ORCID required to finish; GitHub deferred to first publish (a nudge here, not a blocker).
Auto-approve on completion.
Email-PIN stays as the second sign-in method on /login.
Behavior
/auth/me exposes onboarding_required (nemar-cli#833). When true, src/middleware.ts redirects app routes (dashboard / upload / settings) to /welcome until completion.
/welcome.astro (today pure orientation copy) becomes a completion gate when onboarding_required:
Reframe the /welcome gate from "legacy onboarding only" to a profile-completion gate driven by profile_complete from /auth/me (see nemarOrg/nemar-cli#833). Serves new ORCID signups and the legacy migration with the same UI.
Behavior
src/middleware.ts reads profile_complete (+ missing) from /auth/me. When incomplete, gate by action, not globally (graceful):
Accessing/downloading data without city/country -> redirect to the completion form.
Publishing without a GitHub handle -> prompt for it at publish time.
Browsing/exploring stays open.
Completion form: reuse the ORCID complete form (src/pages/auth/orcid/complete.astro) for logged-in users too — collect city/country (required) + affiliation (optional), link ORCID if not yet linked. Name is never typed — it's auto-filled from ORCID.
Legacy users land here on their first email-PIN login and complete in place.
Scope overlap with #226 — flagging so these two don't get built twice with different answers.
The generalized "profile-completion gate" in the comment above and #226 are solving the same problem, and the owner decisions recorded on #226 (2026-08-02) change two of the answers here:
at upload only; browsing and downloading stay open
Completion surface
a new logged-in completion page
/settings, which already has the fields and the notice
Prompt for incomplete profiles
tiered redirect from middleware
dismissible dashboard banner
GitHub handle
prompt at publish
unchanged — required at publish, not before
Where they still differ genuinely: #226 says nothing about legacy email-PIN first login, which is this issue's original subject. That is the part of #129 that survives.
So the split I'd suggest, unless you want it otherwise:
Activity
neuromechanist commentedon Jun 22, 2026
Generalized: profile-completion gate (frontend), tiered
Reframe the
/welcomegate from "legacy onboarding only" to a profile-completion gate driven byprofile_completefrom/auth/me(see nemarOrg/nemar-cli#833). Serves new ORCID signups and the legacy migration with the same UI.Behavior
src/middleware.tsreadsprofile_complete(+missing) from/auth/me. When incomplete, gate by action, not globally (graceful):city/country-> redirect to the completion form.src/pages/auth/orcid/complete.astro) for logged-in users too — collectcity/country(required) +affiliation(optional), link ORCID if not yet linked. Name is never typed — it's auto-filled from ORCID.Already shipped
complete.astronow collects city/country/affiliation and POSTs to/auth/orcid/finalize(feat: collect city/country/affiliation on ORCID signup completion #131, live on app.nemar.org)./auth/orcid/start|callbackproxy (feat: ORCID SSO — login page + iD display in dataset rail #128/feat: ORCID SSO frontend (login button + OAuth proxy + onboarding) #130, live).Remaining (this issue)
profile_complete, do the tiered redirect (data-access -> completion; publish -> GitHub prompt).complete.astropath) collecting only the missing fields.neuromechanist commentedon Aug 3, 2026
Scope overlap with #226 — flagging so these two don't get built twice with different answers.
The generalized "profile-completion gate" in the comment above and #226 are solving the same problem, and the owner decisions recorded on #226 (2026-08-02) change two of the answers here:
Where they still differ genuinely: #226 says nothing about legacy email-PIN first login, which is this issue's original subject. That is the part of #129 that survives.
So the split I'd suggest, unless you want it otherwise:
Not closing either; this needs your call on whether the legacy track is still wanted at all.