MCPcopy Create free account
hub / github.com/netlify/gotrue / Settings

Method Settings

api/settings.go:26–45  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

24}
25
26func (a *API) Settings(w http.ResponseWriter, r *http.Request) error {
27 config := a.getConfig(r.Context())
28
29 return sendJSON(w, http.StatusOK, &Settings{
30 ExternalProviders: ProviderSettings{
31 Bitbucket: config.External.Bitbucket.Enabled,
32 GitHub: config.External.Github.Enabled,
33 GitLab: config.External.Gitlab.Enabled,
34 Google: config.External.Google.Enabled,
35 Facebook: config.External.Facebook.Enabled,
36 Email: !config.External.Email.Disabled,
37 SAML: config.External.Saml.Enabled,
38 },
39 ExternalLabels: ProviderLabels{
40 SAML: config.External.Saml.Name,
41 },
42 DisableSignup: config.DisableSignup,
43 Autoconfirm: config.Mailer.Autoconfirm,
44 })
45}

Callers

nothing calls this directly

Calls 2

getConfigMethod · 0.95
sendJSONFunction · 0.85

Tested by

no test coverage detected