FlowiseAI/Flowise · error · Error

SSO Provider ${providerName} not found

Error message

SSO Provider ${providerName} not found

What it means

Thrown by IdentityManager.initializeSsoProvider() in the default branch of its switch when providerName is not one of the supported providers: 'azure', 'google', 'auth0', 'github'. The method is called during SSO setup to instantiate and register the matching provider class; an unrecognized name means the configuration references a provider Flowise cannot handle, so startup/initialization of that provider is aborted.

Source

Thrown at packages/server/src/IdentityManager.ts:241

                    const googleSSO = new GoogleSSO(app, providerConfig)
                    googleSSO.initialize()
                    this.ssoProviders.set(providerName, googleSSO)
                    break
                }
                case 'auth0': {
                    const auth0SSO = new Auth0SSO(app, providerConfig)
                    auth0SSO.initialize()
                    this.ssoProviders.set(providerName, auth0SSO)
                    break
                }
                case 'github': {
                    const githubSSO = new GithubSSO(app, providerConfig)
                    githubSSO.initialize()
                    this.ssoProviders.set(providerName, githubSSO)
                    break
                }
                default:
                    throw new Error(`SSO Provider ${providerName} not found`)
            }
        }
    }

    async getRefreshToken(providerName: any, ssoRefreshToken: string) {
        if (!this.ssoProviders.has(providerName)) {
            throw new Error(`SSO Provider ${providerName} not found`)
        }
        return await (this.ssoProviders.get(providerName) as SSOBase).refreshToken(ssoRefreshToken)
    }

    public async getProductIdFromSubscription(subscriptionId: string) {
        if (!subscriptionId) return ''
        if (!this.stripeManager) {
            throw new Error('Stripe manager is not initialized')
        }
        return await this.stripeManager.getProductIdFromSubscription(subscriptionId)
    }

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Verify the providerName is exactly one of 'azure', 'google', 'auth0', 'github' (lowercase).
  2. Fix the source of the name: correct the login-method DB row, the env var, or the config JSON.
  3. If you need a new provider, extend the switch with a new SSOBase subclass and rebuild — unsupported names will never pass this guard otherwise.

Example fix

// before
identityManager.initializeSsoProvider(app, 'Google', cfg) // case mismatch

// after
identityManager.initializeSsoProvider(app, 'google', cfg)
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_SSO = ['azure', 'google', 'auth0', 'github']
if (!SUPPORTED_SSO.includes(providerName)) {
    return res.status(400).json({ message: `Unsupported SSO provider: ${providerName}` })
}
identityManager.initializeSsoProvider(app, providerName, cfg)

Type guard

const isSupportedSSOProvider = (v: unknown): v is 'azure' | 'google' | 'auth0' | 'github' =>
    typeof v === 'string' && ['azure', 'google', 'auth0', 'github'].includes(v)

Try / catch

try {
    identityManager.initializeSsoProvider(app, providerName, cfg)
} catch (e) {
    logger.error('SSO provider init failed', { providerName, err: (e as Error).message })
    // a bad provider name is a config error — fix the source, do not retry blindly
}

Prevention

When it happens

Trigger: initializeSsoProvider(app, 'okta', cfg) or any name outside the four supported; a config source (DB login-method row or env) that holds a typo like 'gitlab', 'google-oauth2', or a case variant like 'Google'. Reached during app boot when login methods are loaded and initialized.

Common situations: A login-method DB row migrated from another system with a different provider vocabulary; env/JSON config with an unsupported provider key; case mismatch (the switch is case-sensitive lowercase); a custom provider extension that wasn't registered in the switch.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/a3609699df24f295. Report an issue: GitHub.