theonedev/onedev · error · AuthenticationException
Unable to find SSO provider:
Error message
Unable to find SSO provider:
What it means
SsoProcessPage resolves the SSO provider by name from the URL via SsoProviderService.find(providerName). When no provider with that name is configured it throws AuthenticationException('Unable to find SSO provider: ' + providerName), since the login flow cannot proceed without a matching provider configuration.
Source
Thrown at server-core/src/main/java/io/onedev/server/web/page/security/SsoProcessPage.java:132
throw new RedirectToUrlException(redirectUrlAfterLogin);
else
throw new RestartResponseException(HomePage.class);
}
stage = params.get(PARAM_STAGE).toString();
try {
String providerName = params.get(PARAM_PROVIDER).toString();
providerModel = new LoadableDetachableModel<SsoProvider>() {
@Override
protected SsoProvider load() {
return OneDev.getInstance(SsoProviderService.class).find(providerName);
}
};
if (getProvider() == null)
throw new AuthenticationException(_T("Unable to find SSO provider: ") + providerName);
if (stage.equals(STAGE_INITIATE)) {
String redirectUrlAfterLogin;
Url url = RestartResponseAtInterceptPageException.getOriginalUrl();
if (url != null && url.toString().length() != 0)
redirectUrlAfterLogin = url.toString();
else
redirectUrlAfterLogin = RequestCycle.get().urlFor(HomePage.class, new PageParameters()).toString();
Session.get().bind();
Session.get().setAttribute(SESSION_ATTR_REDIRECT_URL, redirectUrlAfterLogin);
throw new RedirectToUrlException(getProvider().getConnector().buildAuthUrl(providerName));
} else {
authenticated = getProvider().getConnector().handleAuthResponse(providerName);
var aUser = transactionService.call(() -> {
var ssoAccount = ssoAccountService.find(getProvider(), authenticated.getSubject());
if (ssoAccount != null) {
var user = ssoAccount.getUser();
if (user.getType() != ORDINARY || user.isDisabled()) {View on GitHub (pinned to d44925c47c)
Solutions
- Check the exact provider name under Admin > SSO Providers and correct the URL.
- Recreate the SSO provider if it was deleted, keeping the same name as old links.
- Update bookmarks/login-page links to the current provider name.
- Verify the same SSO provider config exists on all nodes if running a cluster.
Defensive patterns
Strategy: fallback
Validate before calling
SsoProvider p = OneDev.getInstance(SsoProviderService.class).find(providerName);
if (p == null) { /* fall back to standard login page */ } Try / catch
try {
startSsoLogin(providerName);
} catch (AuthenticationException e) {
setResponsePage(SignInPage.class);
} Prevention
- Build SSO login URLs from the configured provider list, not hardcoded names.
- Update bookmarks/links when renaming SSO providers.
- Keep provider names casing-consistent across links and config.
- Synchronize SSO configuration across cluster nodes.
When it happens
Trigger: Visiting the SSO process URL with a providerName that does not match any configured SSO provider — provider renamed or deleted after the URL/bookmark was created, typo in the URL, or configuration not restored after migration/upgrade.
Common situations: Saved bookmark to an SSO login that was since removed or renamed in Admin > SSO Providers; cluster node with outdated/out-of-sync configuration; casing mismatch in provider name.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Email address "{0}" already used by another account
- No external password authenticator to authenticate user "{0}
- Unable to change password as you are authenticating via exte
- Email address "{0}" used by account "{1}"
- Email address "{0}" used by disabled account "{1}"
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/8535f6435bd7fd5b.
Report an issue: GitHub.