No need for saferedirect on known connectors

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-03 18:53:02 +04:00
parent 60f968fa07
commit 11a96633ec

View File

@@ -146,15 +146,7 @@ func NewMux(
panic(fmt.Errorf("cannot initiate connector: %w", err))
}
// Allow external redirects for OAuth providers
var oauthSafeRedirect *saferedirect.SafeRedirect
switch provider {
case "SLACK":
oauthSafeRedirect = saferedirect.New(saferedirect.StaticHosts("slack.com"))
case "GOOGLE_WORKSPACE":
oauthSafeRedirect = saferedirect.New(saferedirect.StaticHosts("accounts.google.com"))
}
oauthSafeRedirect.Redirect(w, r, redirectURL, "/", http.StatusSeeOther)
http.Redirect(w, r, redirectURL, http.StatusSeeOther)
})
r.Get("/connectors/complete", func(w http.ResponseWriter, r *http.Request) {