# Workaround for IdPs with one callback URL per OAuth Client (prod + preview) — second provider not working as expected

**URL:** https://community.baserow.io/t/workaround-for-idps-with-one-callback-url-per-oauth-client-prod-preview-second-provider-not-working-as-expected/12889
**Category:** Application Builder
**Tags:** sso
**Created:** [September 10, 2026, 1:22pm UTC](https://community.baserow.io/t/workaround-for-idps-with-one-callback-url-per-oauth-client-prod-preview-second-provider-not-working-as-expected/12889 "2026-09-10T13:22:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bastien](https://community.baserow.io/user_avatar/community.baserow.io/bastien/32/5565_2.png) [@bastien](https://community.baserow.io/u/bastien)
#### Post date: [September 10, 2026, 1:22pm UTC](https://community.baserow.io/t/workaround-for-idps-with-one-callback-url-per-oauth-client-prod-preview-second-provider-not-working-as-expected/12889/1 "2026-09-10T13:22:16Z")

</div>

Hi everyone,

My IdP (OIDC) only allows **one callback URL per OAuth Client**. Since my app has two environments — a published/production domain and the Baserow-hosted Preview URL — I can’t register both callbacks on a single Client. So I created a **second OAuth Client** on the IdP side (with its own callback pointing to the Preview URL) and added it as a **second OIDC provider** in my Baserow User Source.

**Result:**

- Production (using the first provider/Client): login works perfectly.
- Preview (expected to use the second provider/Client): I get an OAuth error.

**What I suspect but haven’t confirmed:** the Login Element doesn’t actually switch between the two configured providers based on preview vs. published context — it may always use the same one (first configured / default), so my second provider is never invoked, and the auth request goes out with the production callback URL regardless of which environment I’m testing in.

**Question:** Is there a supported way to have a User Source use different OIDC providers/callback URLs depending on preview vs. published context? Or is a User Source always tied to a single active provider regardless of environment?

Happy to share the exact `redirect_uri` sent during the failed preview request if that helps debug.

Thanks!
