mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-03 08:46:57 +00:00
fix oauth issues on hold service
This commit is contained in:
+14
-2
@@ -768,9 +768,19 @@ func main() {
|
||||
// This is referenced by its client ID URL
|
||||
mux.HandleFunc("/client-metadata.json", func(w http.ResponseWriter, r *http.Request) {
|
||||
// Create a temporary config to generate metadata (indigo provides this)
|
||||
redirectURI := cfg.Server.PublicURL + "/oauth/callback"
|
||||
redirectURI := cfg.Server.PublicURL + "/auth/oauth/callback"
|
||||
clientID := cfg.Server.PublicURL + "/client-metadata.json"
|
||||
scopes := []string{"atproto"} // Hold service uses default scopes
|
||||
|
||||
// Define scopes needed for hold registration
|
||||
scopes := []string{
|
||||
"atproto",
|
||||
fmt.Sprintf("repo:%s?action=create", atproto.HoldCollection),
|
||||
fmt.Sprintf("repo:%s?action=update", atproto.HoldCollection),
|
||||
fmt.Sprintf("repo:%s?action=create", atproto.HoldCrewCollection),
|
||||
fmt.Sprintf("repo:%s?action=update", atproto.HoldCrewCollection),
|
||||
fmt.Sprintf("repo:%s?action=create", atproto.SailorProfileCollection),
|
||||
fmt.Sprintf("repo:%s?action=update", atproto.SailorProfileCollection),
|
||||
}
|
||||
|
||||
config := indigooauth.NewPublicConfig(clientID, redirectURI, scopes)
|
||||
metadata := config.ClientMetadata()
|
||||
@@ -1035,6 +1045,8 @@ func (s *HoldService) registerWithOAuth(publicURL, handle, did, pdsEndpoint stri
|
||||
fmt.Sprintf("repo:%s?action=update", atproto.HoldCollection),
|
||||
fmt.Sprintf("repo:%s?action=create", atproto.HoldCrewCollection),
|
||||
fmt.Sprintf("repo:%s?action=update", atproto.HoldCrewCollection),
|
||||
fmt.Sprintf("repo:%s?action=create", atproto.SailorProfileCollection),
|
||||
fmt.Sprintf("repo:%s?action=update", atproto.SailorProfileCollection),
|
||||
}
|
||||
|
||||
// Determine base URL based on mode
|
||||
|
||||
Reference in New Issue
Block a user