[GH-ISSUE #5883] Support forwarding login_hint and prompt=login to custom OIDC IdPs #12241

Open
opened 2026-08-05 01:32:43 -04:00 by saavagebueno · 1 comment
Owner

Originally created by @boagoa on GitHub (Apr 14, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5883

Originally assigned to: @jnfrati on GitHub.

Describe the problem

When using a custom OIDC identity provider, the query parameters login=prompt and login_hint are not forwarded to the external IdP.

This causes problems when a user is already signed in via SSO with a different account than the one associated with their NetBird profile. In that case, the login flow can end up using the wrong session and the configuration becomes inconsistent.

Additionally, users or administrators should be able to enforce account re-selection or re-authentication by passing prompt=login.

To Reproduce

Steps to reproduce the behavior:

  1. Install NetBird Combined Docker with the embedded IdP.

  2. Add a custom OIDC identity provider under Settings → Identity Provider.

  3. Run netbird up --management-url xyz [...].

  4. The browser opens and shows the login screen with:

    • Continue with Email (local auth)
    • Continue with Custom OIDC (the added identity provider)
  5. Log in via the custom OIDC provider and create a peer.

  6. After the session times out, NetBird opens the browser again and shows the login screen.

  7. The URL now contains the parameters login=prompt and login_hint=account@mail.tld.

  8. After clicking Custom OIDC, the first redirect goes to https://nbdomain.com/oauth2/auth/<idpid> and still includes both query parameters.

  9. On the next redirect to the external custom OIDC provider, login_hint and login=prompt are no longer present.

Expected behavior

NetBird should preserve and forward OIDC-related parameters such as login_hint and login=prompt to additional/custom OIDC providers.

Ideally, these parameters should also be configurable so administrators can control login behavior for external identity providers.

Are you using NetBird Cloud?

Self-hosted

NetBird version

v0.68.1

Is any other VPN software installed?

No

Additional context

When the previous SSO session belongs to a different account than the one expected by NetBird, the user may be logged in with the wrong identity unless the external IdP receives parameters like login_hint or prompt=login.

Have you tried these troubleshooting steps?


I can also make it sound more like a polished GitHub issue report if you want.

Originally created by @boagoa on GitHub (Apr 14, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5883 Originally assigned to: @jnfrati on GitHub. **Describe the problem** When using a custom OIDC identity provider, the query parameters `login=prompt` and `login_hint` are not forwarded to the external IdP. This causes problems when a user is already signed in via SSO with a different account than the one associated with their NetBird profile. In that case, the login flow can end up using the wrong session and the configuration becomes inconsistent. Additionally, users or administrators should be able to enforce account re-selection or re-authentication by passing `prompt=login`. **To Reproduce** Steps to reproduce the behavior: 1. Install NetBird Combined Docker with the embedded IdP. 2. Add a custom OIDC identity provider under **Settings → Identity Provider**. 3. Run `netbird up --management-url xyz [...]`. 4. The browser opens and shows the login screen with: * **Continue with Email** (local auth) * **Continue with Custom OIDC** (the added identity provider) 5. Log in via the custom OIDC provider and create a peer. 6. After the session times out, NetBird opens the browser again and shows the login screen. 7. The URL now contains the parameters `login=prompt` and `login_hint=account@mail.tld`. 8. After clicking **Custom OIDC**, the first redirect goes to `https://nbdomain.com/oauth2/auth/<idpid>` and still includes both query parameters. 9. On the next redirect to the external custom OIDC provider, `login_hint` and `login=prompt` are no longer present. **Expected behavior** NetBird should preserve and forward OIDC-related parameters such as `login_hint` and `login=prompt` to additional/custom OIDC providers. Ideally, these parameters should also be configurable so administrators can control login behavior for external identity providers. **Are you using NetBird Cloud?** Self-hosted **NetBird version** `v0.68.1` **Is any other VPN software installed?** No **Additional context** When the previous SSO session belongs to a different account than the one expected by NetBird, the user may be logged in with the wrong identity unless the external IdP receives parameters like `login_hint` or `prompt=login`. **Have you tried these troubleshooting steps?** * [ ] Reviewed [[client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client)](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) * [x] Checked for newer NetBird versions * [x] Searched for similar issues on GitHub (including closed ones) * [x] Restarted the NetBird client * [x] Disabled other VPN software * [x] Checked firewall settings --- I can also make it sound more like a polished GitHub issue report if you want.
saavagebueno added the needs-reviewidp labels 2026-08-05 01:32:43 -04:00
Author
Owner

@jnfrati commented on GitHub (Apr 14, 2026):

Hey @boagoa thanks for reaching out!

For the embedded idp we're using Dex as a library, which is the service that controls almost everything that happens under the "/oauth2" path, between 8 and 9, Dex is basically the responsible of the redirection there.

Having said that, there is a chance that maybe we're not configuring Dex properly, right now I don't have the bandwidth to test this out, so it would be super useful if you could try this out with a standalone installation of Dex, that way we can pinpoint where the problem is 🙌

<!-- gh-comment-id:4244624292 --> @jnfrati commented on GitHub (Apr 14, 2026): Hey @boagoa thanks for reaching out! For the embedded idp we're using [Dex](https://dexidp.io/) as a library, which is the service that controls almost everything that happens under the "/oauth2" path, between 8 and 9, Dex is basically the responsible of the redirection there. Having said that, there is a chance that maybe we're not configuring Dex properly, right now I don't have the bandwidth to test this out, so it would be super useful if you could try this out with a standalone installation of Dex, that way we can pinpoint where the problem is 🙌
Sign in to join this conversation.
No Label idp needs-review
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12241