# copilot: Decouple authentication from the lifetime of any single Copilot instance \(\#47473\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7c98f1732edc04458b8a96221d956fb8c50c13f0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7c98f1732edc04458b8a96221d956fb8c50c13f0

Requested commit: 7c98f1732edc04458b8a96221d956fb8c50c13f0

Commit: 7c98f1732edc04458b8a96221d956fb8c50c13f0

Tree: faec256ddd32bf7e07bd31d3f3cc4bd45cc9b5ef

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
copilot: Decouple authentication from the lifetime of any single Copilot instance (#47473)

Users had trouble signing in due to us relying on the Copilot::global
being set, which was never the case. We've decided to use a dedicated
LSP instance just for handling auth of Copilot Chat and other goodies.
That instance is subscribed to by local Copilot instances for projects.
When the Auth instance changes it's state, local instances are prompted
to re-check their own sign in status.

Closes #47352

Co-authored-by: dino <dinojoaocosta@gmail.com>

Release Notes:

- Fixed authentication issues with Copilot.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
```

## Parents

- [21f49eba7a5a8a074c967851eebd770805293952](https://git.cafe/gitcafe/zed/commit/21f49eba7a5a8a074c967851eebd770805293952?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7c98f1732edc04458b8a96221d956fb8c50c13f0?format=markdown)
