MCPcopy
hub / github.com/FlowiseAI/Flowise / ssoSuccess

Function ssoSuccess

packages/server/src/enterprise/controllers/auth/index.ts:100–111  ·  view source on GitHub ↗
(req: Request, res: Response, next: NextFunction)

Source from the content-addressed store, hash-verified

98}
99
100const ssoSuccess = async (req: Request, res: Response, next: NextFunction) => {
101 try {
102 const appServer = getRunningExpressApp()
103 const ssoToken = req.query.token as string
104 const user = await appServer.cachePool.getSSOTokenCache(ssoToken)
105 if (!user) return res.status(401).json({ message: 'Invalid or expired SSO token' })
106 await appServer.cachePool.deleteSSOTokenCache(ssoToken)
107 return res.json(user)
108 } catch (error) {
109 next(error)
110 }
111}
112export default {
113 getAllPermissions,
114 ssoSuccess

Callers

nothing calls this directly

Calls 3

getRunningExpressAppFunction · 0.90
getSSOTokenCacheMethod · 0.80
deleteSSOTokenCacheMethod · 0.80

Tested by

no test coverage detected