mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-25 22:08:46 +00:00
fix: return auth none when no auth is configured for smtp + scopes in grpc response (#11554)
# Which Problems Are Solved - When no auth was present on a smtp configuration, the `auth` field was `nil` on the response while it should be `none`. - Scopes were not properly retrieved from the database resulting in all scopes being combined in one scope when retrieving the configuration. # How the Problems Are Solved - Set `auth` to `none` when no auth is configured - Use `database.TextArray[string]` as type to get the scopes from the database # Additional Changes # Additional Context
This commit is contained in:
@@ -108,6 +108,12 @@ func smtpToPb(config *query.SMTP) *settings_pb.EmailProvider_Smtp {
|
||||
ret.Smtp.Auth = xoauth2
|
||||
}
|
||||
|
||||
if config.XOAuth2Auth == nil && config.PlainAuth == nil {
|
||||
ret.Smtp.Auth = &settings_pb.EmailProviderSMTP_None{
|
||||
None: &settings_pb.SMTPNoAuth{},
|
||||
}
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user