fix(plugin): authorization code redirect to static url (#191)

This commit is contained in:
mrh997
2025-08-07 12:24:18 +08:00
committed by GitHub
parent efbc82e8b3
commit e2b1f6e381
12 changed files with 79 additions and 63 deletions

View File

@@ -16,25 +16,6 @@
package entity
import (
"strings"
)
const (
larkPluginOAuthHostName = "open.larkoffice.com"
larkOAuthHostName = "open.feishu.cn"
)
func GetOAuthProvider(tokenURL string) OAuthProvider {
if strings.Contains(tokenURL, larkPluginOAuthHostName) {
return OAuthProviderOfLarkPlugin
}
if strings.Contains(tokenURL, larkOAuthHostName) {
return OAuthProviderOfLark
}
return OAuthProviderOfStandard
}
type SortField string
const (
@@ -43,9 +24,3 @@ const (
)
type OAuthProvider string
const (
OAuthProviderOfLarkPlugin OAuthProvider = "lark_plugin"
OAuthProviderOfLark OAuthProvider = "lark"
OAuthProviderOfStandard OAuthProvider = "standard"
)