Skip to content

fix(cli): resolve CPR/UUID login queries to the userId#15

Merged
Saturate merged 2 commits into
mainfrom
fix/login-resolve-cpr-uuid
Jun 15, 2026
Merged

fix(cli): resolve CPR/UUID login queries to the userId#15
Saturate merged 2 commits into
mainfrom
fix/login-resolve-cpr-uuid

Conversation

@Saturate

Copy link
Copy Markdown
Owner

mitid login passed the raw query straight to MitID identify, which only accepts a userId. So a CPR or UUID (both documented as valid queries, and what resolveQuery falls through on) failed with identity_not_found — e.g. mitid login 0101900001 <url>.

The login command already resolves the identity (the lookup handles userId, CPR, and UUID). This uses the resolved identity.userId as the username handed to login(), so alias, userId, CPR, and UUID all work. On --no-approve the lookup is best-effort and falls back to the raw query.

Saturate added 2 commits June 15, 2026 13:52
`mitid login` passed the raw query straight to MitID identify, which only
accepts a userId, so a CPR or UUID (both documented as valid queries) failed
with identity_not_found. Use the userId from the already-resolved identity
instead, so alias, userId, CPR, and UUID all work.
@Saturate Saturate merged commit 54fcb68 into main Jun 15, 2026
3 checks passed
@Saturate Saturate deleted the fix/login-resolve-cpr-uuid branch June 15, 2026 11:54
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