Skip to content

Commit 7e6197f

Browse files
authored
Merge pull request #121 from docker/fix_oauth_doesnt_exist
Show error when OAuth provider doesn't exist
2 parents 939e090 + a3ee620 commit 7e6197f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/docker-mcp/oauth/auth.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ func Authorize(ctx context.Context, app string, scopes string) error {
1515
return err
1616
}
1717

18+
// Check if the response contains a valid browser URL
19+
if authResponse.BrowserURL == "" {
20+
return fmt.Errorf("OAuth provider does not exist")
21+
}
22+
1823
fmt.Printf("Opening your browser for authentication. If it doesn't open automatically, please visit: %s\n", authResponse.BrowserURL)
1924

2025
return nil

0 commit comments

Comments
 (0)