Add multi-domain OAuth/OpenID support#26074
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (41.17%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #26074 +/- ##
==========================================
+ Coverage 59.13% 59.51% +0.37%
==========================================
Files 2076 2077 +1
Lines 131333 131352 +19
Branches 7848 7976 +128
==========================================
+ Hits 77666 78174 +508
+ Misses 53667 53178 -489
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
At some point this looks to have stopped working.
Tests
- Expect non SSO login to succeed
- Expect multi domain non SSO login to succeed
- Expect regular SSO login to succeed
- Expect multi domain SSO login to succeed -
FAIL-Non-issue
Reproduction
Screen.Recording.2025-11-13.at.9.57.32.PM.mov
From what I see it's because isUrlAllowed is checking the port (protocol+domain+port) + pathname. |
I suggested that we stay consistent with the existing end-of-flow check in |
Expected, only PUBLIC_URL should have domain fallback
* feat: use origin host for authentification * fix: remove context for client error * build: add changeset * fix: fix lint * feat: optimise code * fix: rename utils method * fix: optimise code * feat: use AUTH_**_REDIRECT_ALLOW_LIST * fix: remove old env * fix: avoid empty redirectUris * feat: handle some optimisation * refactor: optimize util * tests: add oauth-callbacks util test * build: update changeset * fix: fix lint * refactor: clean up code * refactor: remove ordering logic * feat: add new tests * fix: update tests * fix: update tests * test: update it * test: clean up code * test: update test * test: update tests * fix: fix vite proxy * fix: handle feedbacks * build: change sentence in past * refactor: disable change origin * refactor: optimize code * fix: format code * fix: format code * refactor: optimise code * refactor: lint * fix: fix callback injection * refactor: handle feedbacks * fix: fix isLoginRedirectAllowed usage * fix: handle feedbacks * fix: handle feedbacks * refactor: revert logic * lint: clean up * fix: update tests * refactor: fix formating * fmt --------- Co-authored-by: daedalus <[email protected]>
This reverts commit aa7d1ac.
|
Thanks for reporting @BlackDahlia313 👍. We've reverted it and sent out a patch release. It seems this one needed a bit longer in the oven. We'll try to address the cases uncovered here and send it back out when it's ready. |
NP! Thanks for the taking the time to deep dive into this! I think it was just perfect timing I caught this haha. I like the direction of what's intended. Here to help test if needed! |

Scope
What's changed:
AUTH_<PROVIDER>_REDIRECT_ALLOW_LISTenvoauth-callbacks.tsutilityX-Forwarded-HostandX-Forwarded-Protoforwarding in Vite development proxyPotential Risks / Drawbacks
IP_TRUST_PROXYis misconfigured behind a reverse proxy, host headers could be spoofed (same risk as existing code, but now used for OAuth callbacks)Tested Scenarios
AUTH_<PROVIDER>_REDIRECT_ALLOW_LISTconfiguredIP_TRUST_PROXYChecklist
Fixes #25404