Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 13, 2025

This PR fixes the 403 authentication errors that UK users have been experiencing since the August/Yale split when using country code 'GB'.

Problem

UK users were encountering 403 errors during authentication because the August API infrastructure doesn't have dedicated endpoints for the UK region. The plugin already had country code normalization for Canada (CA → US) and Mexico (MX → US), but was missing the same handling for the United Kingdom.

Solution

Added 'GB': 'US' to the country code normalization mapping in platform.ts. This ensures UK users authenticate through the US endpoints, which resolves the 403 errors while maintaining all existing functionality.

Changes

  • Country Code Normalization: Added GB to the countryCodeMapping object to route UK authentication through US servers
  • Configuration Schema: Updated the description to clarify that CA, MX, and GB are normalized to US
  • Comprehensive Testing: Added 4 new test cases covering:
    • Basic GB→US normalization
    • Case-insensitive handling (gbUS)
    • Respecting the disableCountryCodeNormalization option for GB
    • Preserving existing behavior for other countries

Backward Compatibility

This change is fully backward compatible. UK users who want to disable normalization can still use the existing disableCountryCodeNormalization: true option in their configuration.

Fixes #180.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Bug: Fix 403 authentication errors for UK users by adding GB country code normalization Sep 13, 2025
@Copilot Copilot AI requested a review from donavanbecker September 13, 2025 16:33
Copilot finished work on behalf of donavanbecker September 13, 2025 16:33
@donavanbecker donavanbecker marked this pull request as ready for review September 13, 2025 17:30
@donavanbecker donavanbecker changed the base branch from latest to beta-3.0.4 September 13, 2025 17:31
@donavanbecker donavanbecker merged commit 92c24b3 into beta-3.0.4 Sep 13, 2025
3 checks passed
@donavanbecker donavanbecker deleted the copilot/fix-180 branch September 13, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug:
2 participants