Skip to content

fix: disable default Cross-Origin-Opener-Policy header for popup OIDC flows - #515

Merged
notquitenothing merged 2 commits into
voidauth:mainfrom
denkristoffer:fix/disable-coop-popup-oidc
Jul 23, 2026
Merged

fix: disable default Cross-Origin-Opener-Policy header for popup OIDC flows#515
notquitenothing merged 2 commits into
voidauth:mainfrom
denkristoffer:fix/disable-coop-popup-oidc

Conversation

@denkristoffer

@denkristoffer denkristoffer commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

Disable the Cross-Origin-Opener-Policy: same-origin header that gets set by default by Helmet. The policy places cross-origin popup pages in a separate browsing-context, which means window.opener is null. Some OIDC clients rely on the opener to complete the login handoff. I saw this cause problems with Synology DSM and with Komga.

I also added a backend test and npm script to run it. Let me know if you don't want this.

Related Tickets & Documents

None

AI Usage

I used Codex with gpt-5.6 to write the regression test.

Screenshots

N/A

@notquitenothing

Copy link
Copy Markdown
Collaborator

I would prefer a simpler version of this, just setting crossOriginOpenerPolicy: { policy: 'same-origin-allow-popups' } in helmet. No need for added tests and file-splitting for this simple patch

@denkristoffer
denkristoffer force-pushed the fix/disable-coop-popup-oidc branch from 72696be to ce15fef Compare July 22, 2026 08:18
@denkristoffer

Copy link
Copy Markdown
Contributor Author

I would prefer a simpler version of this, just setting crossOriginOpenerPolicy: { policy: 'same-origin-allow-popups' } in helmet. No need for added tests and file-splitting for this simple patch

@notquitenothing Sure, I've removed the extras 🙂 same-origin-allow-popups would not work here since it's the opener (like Komga) that would need to set that policy, and even then it would only work with VoidAuth having the default unsafe-none because they are cross-origin.

@notquitenothing
notquitenothing merged commit 3541841 into voidauth:main Jul 23, 2026
1 check passed
@denkristoffer
denkristoffer deleted the fix/disable-coop-popup-oidc branch July 23, 2026 07:41
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