fix oauth scope mismatch

This commit is contained in:
Evan Jarrett
2026-01-05 20:26:41 -06:00
parent a448e8257b
commit f35bf2bcde
10 changed files with 1510 additions and 50 deletions
+2 -7
View File
@@ -114,7 +114,7 @@ func serveRegistry(cmd *cobra.Command, args []string) error {
slog.Debug("Base URL for OAuth", "base_url", baseURL)
if testMode {
slog.Info("TEST_MODE enabled - will use HTTP for local DID resolution and transition:generic scope")
slog.Info("TEST_MODE enabled - will use HTTP for local DID resolution")
}
// Create OAuth client app (automatically configures confidential client for production)
@@ -123,11 +123,6 @@ func serveRegistry(cmd *cobra.Command, args []string) error {
if err != nil {
return fmt.Errorf("failed to create OAuth client app: %w", err)
}
if testMode {
slog.Info("Using OAuth scopes with transition:generic (test mode)")
} else {
slog.Info("Using OAuth scopes with RPC scope (production mode)")
}
// Invalidate sessions with mismatched scopes on startup
// This ensures all users have the latest required scopes after deployment
@@ -383,7 +378,7 @@ func serveRegistry(cmd *cobra.Command, args []string) error {
logoURI := cfg.Server.BaseURL + "/web-app-manifest-192x192.png"
policyURI := cfg.Server.BaseURL + "/privacy"
tosURI := cfg.Server.BaseURL + "/terms"
metadata := config.ClientMetadata()
metadata.ClientName = &cfg.Server.ClientName
metadata.ClientURI = &cfg.Server.BaseURL
+1 -1
View File
@@ -110,7 +110,7 @@ func main() {
fmt.Println("=== Calculating from hold layer records ===")
fmt.Println("NOTE: May undercount app-password users due to layer record bug")
fmt.Println(" Use --from-manifests for more accurate results")
userUsage, err = calculateFromLayerRecords(baseURL, holdDID)
}