Skip to content

IntegrationAuthenticationService does not react to gitlens.cloudIntegrations.enabled change #4979

@sergeibbb

Description

@sergeibbb

This is a follow-up of #4492

The problem

  • turn "gitlens.cloudIntegrations.enabled" to false
  • reload window: The app starts using Local providers
  • turn "gitlens.cloudIntegrations.enabled" to true
  • ⚠️ without reloading the window the app keeps using Local providers

Explanation

In IntegrationAuthenticationService.get() if we find a value in this.providers map, we just use it and never recreate. Therefore even if the gitlens.cloudIntegrations.enabled is updated we keep using the previous Authentication provider for a certain integration type.

Possible solution

Option 1

Listen to the config update and invalidate all providers.

Option 2

include value of the gitlens.cloudIntegrations.enabled config to the key, so we can keep both types of providers stored in the map and use one that matches to the current configuration.

Metadata

Metadata

Assignees

Labels

triageNeeds to be looked at

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions