appview/oauth: support custom PLC directory #704

closed
opened by boltless.me targeting master from sandboxed-atmosphere
  • inherit idResolver's PLC directory for oauth
  • override Client.Transport to support PDS served in localhost

Signed-off-by: Seongmin Lee git@boltless.me

Changed files
+5
appview
oauth
state
+4
appview/oauth/oauth.go
··· 74 74 75 75 clientApp := oauth.NewClientApp(&oauthConfig, authStore) 76 76 clientApp.Dir = res.Directory() 77 + // allow non-public transports in dev mode 78 + if config.Core.Dev { 79 + clientApp.Resolver.Client.Transport = http.DefaultTransport 80 + } 77 81 78 82 clientName := config.Core.AppviewName 79 83
+1
appview/state/login.go
··· 46 46 47 47 redirectURL, err := s.oauth.ClientApp.StartAuthFlow(r.Context(), handle) 48 48 if err != nil { 49 + l.Error("failed to start auth", "err", err) 49 50 http.Error(w, err.Error(), http.StatusInternalServerError) 50 51 return 51 52 }