{"record":{"id":"a3609699df24f295","repo":"FlowiseAI/Flowise","slug":"sso-provider-providername-not-found","errorCode":null,"errorMessage":"SSO Provider ${providerName} not found","messagePattern":"SSO Provider (.+?) not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/server/src/IdentityManager.ts","lineNumber":241,"sourceCode":"                    const googleSSO = new GoogleSSO(app, providerConfig)\n                    googleSSO.initialize()\n                    this.ssoProviders.set(providerName, googleSSO)\n                    break\n                }\n                case 'auth0': {\n                    const auth0SSO = new Auth0SSO(app, providerConfig)\n                    auth0SSO.initialize()\n                    this.ssoProviders.set(providerName, auth0SSO)\n                    break\n                }\n                case 'github': {\n                    const githubSSO = new GithubSSO(app, providerConfig)\n                    githubSSO.initialize()\n                    this.ssoProviders.set(providerName, githubSSO)\n                    break\n                }\n                default:\n                    throw new Error(`SSO Provider ${providerName} not found`)\n            }\n        }\n    }\n\n    async getRefreshToken(providerName: any, ssoRefreshToken: string) {\n        if (!this.ssoProviders.has(providerName)) {\n            throw new Error(`SSO Provider ${providerName} not found`)\n        }\n        return await (this.ssoProviders.get(providerName) as SSOBase).refreshToken(ssoRefreshToken)\n    }\n\n    public async getProductIdFromSubscription(subscriptionId: string) {\n        if (!subscriptionId) return ''\n        if (!this.stripeManager) {\n            throw new Error('Stripe manager is not initialized')\n        }\n        return await this.stripeManager.getProductIdFromSubscription(subscriptionId)\n    }","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/server/src/IdentityManager.ts#L223-L259","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the providerName is exactly one of 'azure', 'google', 'auth0', 'github' (lowercase).","Fix the source of the name: correct the login-method DB row, the env var, or the config JSON.","If you need a new provider, extend the switch with a new SSOBase subclass and rebuild — unsupported names will never pass this guard otherwise."],"exampleFix":"// before\nidentityManager.initializeSsoProvider(app, 'Google', cfg) // case mismatch\n\n// after\nidentityManager.initializeSsoProvider(app, 'google', cfg)","handlingStrategy":"validation","validationCode":"const SUPPORTED_SSO = ['azure', 'google', 'auth0', 'github']\nif (!SUPPORTED_SSO.includes(providerName)) {\n    return res.status(400).json({ message: `Unsupported SSO provider: ${providerName}` })\n}\nidentityManager.initializeSsoProvider(app, providerName, cfg)","typeGuard":"const isSupportedSSOProvider = (v: unknown): v is 'azure' | 'google' | 'auth0' | 'github' =>\n    typeof v === 'string' && ['azure', 'google', 'auth0', 'github'].includes(v)","tryCatchPattern":"try {\n    identityManager.initializeSsoProvider(app, providerName, cfg)\n} catch (e) {\n    logger.error('SSO provider init failed', { providerName, err: (e as Error).message })\n    // a bad provider name is a config error — fix the source, do not retry blindly\n}","preventionTips":["Validate provider names against the supported list before persisting them as login-method rows.","Keep provider names lowercase in config (the switch is case-sensitive).","Log the offending name at startup so misconfig is visible immediately."],"tags":["sso","config","authentication","initialization"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}