Skip to content

Lmendoa/pd 6016 - #2903

Merged
amontenegro merged 3 commits into
mainfrom
lmendoa/PD-6016
Aug 12, 2026
Merged

Lmendoa/pd 6016#2903
amontenegro merged 3 commits into
mainfrom
lmendoa/PD-6016

Conversation

@cryptalith

Copy link
Copy Markdown
Member

No description provided.

The stored oauthRedirectUrl has one writer, AuthorizeGuard, and it only
runs when an unauthenticated visitor hits /oauth/authorize. The first
successful sign in reads that URL and clears it, so by the time the
authorization screen renders the key is already gone.

Signing out from that screen hard navigates to /signin with the OAuth
query params intact, which never crosses AuthorizeGuard and so never
stores the URL again. SignInGuard does not store it either. A following
institutional sign in therefore returns to third-party-signin-completed
with nothing to redirect to, and the guard falls through to my-orcid
instead of the authorization screen.

Store the current authorize URL before logging out, using
window.location.href so the value matches what AuthorizeGuard writes and
get() strips show_login and prompt exactly as it does on the first pass.
It runs before noRedirectLogout so the URL survives a failed logout.
src/test.ts was configured as the karma main but contained only the
zone.js import and initTestEnvironment, without the require.context that
pulls in spec files. With a main set, the builder loads only that entry,
so ng test ran 1 test while 334 spec files sat unexecuted. The suite has
effectively been a no-op, which is how a regression can land in a file
that ships with tests.

Declare zone.js/testing alongside the existing polyfills and drop main,
which lets the builder discover specs from tsconfig.spec.json. Delete
test.ts, now unreachable, and drop it from the spec tsconfig files list.
Turning spec discovery back on surfaced six component specs that had
never run. They fail identically on 20.1.6, so none of this is fallout
from the upgrade; they simply rotted unobserved.

Most were missing TestBed imports for what their templates actually use:
MatFormField/MatInput for mat-form-field and the errorStateMatcher
binding, MatCard/MatCheckbox for the interstitial, ReactiveFormsModule
for [formGroup], and CUSTOM_ELEMENTS_SCHEMA where a template renders a
sibling app-* component. Real modules rather than NO_ERRORS_SCHEMA, so
the specs keep catching template errors.

Two specs stubbed FormBuilder with object literals that only looked like
form controls. They passed only because ReactiveFormsModule was absent
and the bindings were never evaluated; with the directives present they
have to be real, so use the actual FormBuilder. ShareEmailsDomains also
needed a record carrying emailDomains, since the component builds its
form inside a filtered subscription and an empty record left formGroup
bound to undefined.
@amontenegro

Copy link
Copy Markdown
Member

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Your UI docs preview is ready!

Preview URL: https://orcid.github.io/orcid-angular/runway/PD-6016/

This preview will be updated automatically when you push new commits to this PR.


Deployed from commit: f342ad8

@amontenegro
amontenegro merged commit 7110164 into main Aug 12, 2026
11 checks passed
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.

2 participants