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
{{ message }}
Repository navigation
feat: ORCID-canonical name + standardized profile (city/country required, affiliation, GitHub) — CLI + DB #835
Now that ORCID SSO is live (#832), make ORCID the canonical source for a researcher's name and standardize the user profile. Users should never hand-type their name; it comes from ORCID. Add the profile fields we actually need, including export-control screening data.
Small DB change; the bulk of the work is on the CLI (signup/profile flow) plus a backend ORCID-capture tweak.
Profile fields (target shape on users)
Field
Source
Required
given_name, family_name
ORCID (canonical, never hand-entered)
yes (from ORCID)
email
user
yes (sign-in codes, notices)
city, country
user
yes — US export-control / sanctions screening
affiliation
user
optional (institution)
github_username
user
for dataset-repo collaboration (required to publish)
given_name/family_name already exist (migration 0051). This issue adds affiliation, city, country.
DB (small)
New migration: ALTER TABLE users ADD COLUMN affiliation TEXT; city TEXT; country TEXT; — additive, nullable (existing rows backfill later). "Required" is enforced at the app/CLI layer, not a NOT NULL constraint (avoids breaking existing rows + the SQLite rebuild).
Backend
ORCID OAuth: add the openid scope and read given_name / family_name from the id_token (the plain /authenticate token body only returns the full name, not the split). Persist them on the user row on find-or-create / link / finalize, so they refresh from ORCID on login.
Signup/onboarding finalize + any profile-update endpoint: require city + country.
Expose name + city/country on /auth/me (and the CLI profile endpoint) where needed.
CLI (the bulk of the work)
nemar auth signup: pull name from ORCID (stop prompting for it); prompt for city + country (required), affiliation (optional), confirm email, GitHub handle; submit.
nemar auth whoami / profile display: show the real name (given + family), not the username.
nemar profile (or equivalent) to view/update affiliation, city, country.
Validation: reject signup/update without city + country.
Why city/country are required
NEMAR is subject to US export-control / sanctions rules; collecting city + country lets us screen data access. This is a hard requirement, not optional.
Done means
A new user signs in with ORCID, never types their name, provides city/country (+ optional affiliation, GitHub handle), and the account stores ORCID-canonical name + the screening fields.
The existing handful of users are backfilled (manual, separate from this issue).
Activity
Merge pull request #836 from nemarOrg/feature/issue-835-orcid-profile
test: add ORCID/city/country to signup test bodies (#849)
Address v0.9.7 review: backend
Phase 3: request upload access and onboarding (#1265)