-
Notifications
You must be signed in to change notification settings - Fork 420
frequent reauthentication (github enterprise with SSO) #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Not immediately obvious what this would be. I have not historically had this problem when testing
Do you have any evidence to support that? It's a good guess for sure, but when I look at the code, I don't see the telltale Can you tell me how exactly the problem is manifesting for you? Do you get an error message? Anything interesting in |
And can you tell me what's happening at |
Start neovim. Notice copilot is not suggesting anything.
Sadly, I do not have privileges.
No. Have to agree with you there. I jumped to the conclusion because vscode with the same enterprise+SSO setup requires a single sign-on and no reauthentication. Maybe close this if you don't see the same behaviour and I can reopen if I find something more tangible. |
Is restarting required to reproduce the problem? If you leave Neovim running, does it continue to work?
This just Settings > Applications > Authorized GitHub Apps. Can you navigate to that? |
Seems like it. Had nvim running since Friday,
Works after signing in. Could the expired certificates somehow be relevant? Appears each time I restart. But copilot.vim does not require reauthentication everytime I restart neovim. Just when restarting after some time has gone by.
Yes ofc, my bad. No change there. There are however entries in Reauthenticated with nvim and vscode to spot differences. Provoking reauth for vscode required explicitly signing the user out of github and back in. Not sure if relevant, but oauth_application_name was not present for copilot.vim entry and token_scopes was user:email for vscode and blank for copilot.vim.
Other fields present in both entries: |
Verify it actually completes something. Status remains "ready" until there's an error.
No, that's harmless. |
Aha, but I did complete with it also 👍 Edit: Maybe I was wrong. The session I had running since last night did not complete anything. |
I notice that the two Oauth apps I have for my account is vscode and gh cli. The gh cli login is also very sticky. One could piggyback on gh cli e.g. |
After setting
vim.g.copilot_auth_provider_url
and authenticating, the extension works superbly.But the token for copilot.vim is valid as long as your SSO session lasts. Typically 24 hours. This leads to frequent reauthentication. I believe VSCode manages a refresh token so you do not have to reauthenticate.
Is it feasible to support refresh tokens? If not, do you have any ideas for a workaround?
The text was updated successfully, but these errors were encountered: