fix: use client secret field for providers (#2355)

* feat: fix key exposure problem

* fix display bug
This commit is contained in:
UsherFall
2023-09-24 18:35:58 +08:00
committed by GitHub
parent b94d06fb07
commit aab6a799fe
5 changed files with 45 additions and 36 deletions

View File

@ -18,9 +18,9 @@ type EmailProvider interface {
Send(fromAddress string, fromName, toAddress string, subject string, content string) error
}
func GetEmailProvider(typ string, clientId string, clientSecret string, appId string, host string, port int, disableSsl bool) EmailProvider {
func GetEmailProvider(typ string, clientId string, clientSecret string, host string, port int, disableSsl bool) EmailProvider {
if typ == "Azure ACS" {
return NewAzureACSEmailProvider(appId, host)
return NewAzureACSEmailProvider(clientSecret, host)
} else {
return NewSmtpEmailProvider(clientId, clientSecret, host, port, typ, disableSsl)
}