Skip to content

fix: Set ffIsEnabled only auth provider is present in config

Administrator requested to merge issue-1785 into master

Created by: KattMingMing

Resolves: https://github.com/sourcegraph/sourcegraph/issues/1785

When only 1 OAuth provider was enabled at a time there was an issue that the wrong provider was returned. This error surfaced because of the use of getExactlyOneOAuthProvider call which would attempt to redirect to the externalURL.

I confirmed this works for:

  • 1 OAuth provider (auto-redirect still works)
  • built-in + 1 OAuth
  • built-in + 2 OAuth
  • 2 OAuth

Merge request reports

Loading