mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-01 21:37:33 +08:00
@@ -175,19 +175,9 @@ func (r *Router) Setup(engine *gin.Engine) {
|
||||
// searchbots
|
||||
apiNoAuth.GET("/searchbots/detail", r.searchBotHandler.SearchBotDetail)
|
||||
|
||||
// User login channels endpoint
|
||||
apiNoAuth.GET("/auth/login/channels", r.userHandler.GetLoginChannels)
|
||||
|
||||
// User login by email endpoint
|
||||
apiNoAuth.POST("/auth/login", r.userHandler.LoginByEmail)
|
||||
|
||||
// OAuth / OIDC login routes. The static "channels" segment is
|
||||
// registered before the wildcard, so gin's tree resolves
|
||||
// /auth/login/channels to GetLoginChannels and other values to
|
||||
// OAuthLogin without conflict.
|
||||
apiNoAuth.GET("/auth/login/:channel", r.userHandler.OAuthLogin)
|
||||
apiNoAuth.GET("/auth/oauth/:channel/callback", r.userHandler.OAuthChannelCallback)
|
||||
|
||||
// Register
|
||||
apiNoAuth.POST("/users", r.userHandler.Register)
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ func SetupEERouter(engine *gin.Engine) {
|
||||
|
||||
func RegisterEENoAuthRouter(apiNoAuth *gin.RouterGroup, r *Router) {
|
||||
// For EE
|
||||
apiNoAuth.GET("/auth/login/channels", r.userHandler.GetLoginChannels)
|
||||
apiNoAuth.GET("/auth/login/:channel", r.userHandler.OAuthLogin)
|
||||
apiNoAuth.GET("/auth/oauth/:channel/callback", r.userHandler.OAuthChannelCallback)
|
||||
apiNoAuth.GET("/auth/oauth/callback", r.userHandler.OAuthCallback)
|
||||
apiNoAuth.GET("/auth/oauth/github/callback", r.userHandler.GitHubAuthCallback)
|
||||
apiNoAuth.GET("/auth/oauth/lark/callback", r.userHandler.LarkAuthCallback)
|
||||
|
||||
Reference in New Issue
Block a user