diff --git a/cmd/appview/main.go b/cmd/appview/main.go index d4a6721..980e091 100644 --- a/cmd/appview/main.go +++ b/cmd/appview/main.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "fmt" "log" "net/http" "os" @@ -39,6 +40,7 @@ func (srv *Server) HandleClientMetadata(w http.ResponseWriter, r *http.Request) doc := srv.oauthApp.Config.ClientMetadata() // if this is is a confidential client, need to set doc.JWKSURI, and implement a handler + // Probably the thing which was set inside the tangled devshell w.Header().Set("Content-Type", "application/json") if err := json.NewEncoder(w).Encode(doc); err != nil { @@ -54,8 +56,8 @@ func main() { var config oauth.ClientConfig if hostname != "" { config = oauth.NewPublicConfig( - "https://app.example.com/client-metadata.json", - "https://app.example.com/oauth/callback", + fmt.Sprintf("https://%s/client-metadata.json", hostname), + fmt.Sprintf("https://%s/oauth/callback", hostname), []string{"atproto", "transition:generic"}, ) } else {