Skip to content

Treat orcid_in_use as the single ORCID-conflict code #305

Closed

Description

@neuromechanist

Why

nemar-cli #1254 (ADR 0043) makes an ORCID iD back at most one live NEMAR account, and returns a typed code on every refusal.

Two of those codes mean the same thing to a user:

  • orcid_in_use — the iD is already on a live account through users.orcid.
  • orcid_already_linked — the iD already has an oauth_identities row.

The only difference is which constraint noticed, which is not something a person can act on. Both carry the same message, which already points at Settings.

orcid_already_linked is kept for now purely because it is what POST /auth/orcid/finalize has always returned and the site switches on it today. It is marked DEPRECATED in shared/contract/identity.ts.

What to do here

  • Treat orcid_in_use and orcid_already_linked as the same case, keyed on orcid_in_use.
  • Confirm nothing else branches on orcid_already_linked.

Once that ships, nemar-cli can stop emitting orcid_already_linked from finalize and delete the alias from the contract.

Full code list (all carry code and message)

orcid_in_use, orcid_already_linked (deprecated), orcid_linked_other, email_in_use, github_in_use, identity_conflict_remains.

Refs: nemarOrg/nemar-cli#1254, nemarOrg/nemar-cli#1250, ADR 0043.

Activity

  1. neuromechanist commented on Sep 6, 2026

    @neuromechanist
    ContributorAuthor

    Merged to staging in #308. nemar-cli can drop the orcid_already_linked alias once this reaches production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions