diff --git a/appview/oauth/oauth.go b/appview/oauth/oauth.go index ba204f5a..cc1245a9 100644 --- a/appview/oauth/oauth.go +++ b/appview/oauth/oauth.go @@ -74,6 +74,10 @@ func New(config *config.Config, ph posthog.Client, db *db.DB, enforcer *rbac.Enf clientApp := oauth.NewClientApp(&oauthConfig, authStore) clientApp.Dir = res.Directory() + // allow non-public transports in dev mode + if config.Core.Dev { + clientApp.Resolver.Client.Transport = http.DefaultTransport + } clientName := config.Core.AppviewName diff --git a/appview/state/login.go b/appview/state/login.go index 89797cb7..309ef2f5 100644 --- a/appview/state/login.go +++ b/appview/state/login.go @@ -46,6 +46,7 @@ func (s *State) Login(w http.ResponseWriter, r *http.Request) { redirectURL, err := s.oauth.ClientApp.StartAuthFlow(r.Context(), handle) if err != nil { + l.Error("failed to start auth", "err", err) http.Error(w, err.Error(), http.StatusInternalServerError) return }