Skip to content
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

Check access token before firing auth change event #1429

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

msujew
Copy link
Contributor

@msujew msujew commented Feb 18, 2024

I've recently noticed an issue with the tabnine extension in Eclipse Theia, see eclipse-theia/theia#13336. I've tracked the issue down to a call to getState, which incorrectly fires the auth session change event, even though no login information has changed (some other, state related information changed, but the auth info was the same). I couldn't figure out why the extension behaves differently in vscode vs Theia, since both send the exact same events to the extension.

Instead, this change prevents the session change event from firing in case the access token didn't change. I've confirmed that this fixes the issue in Theia and as far as I could tell doesn't introduce any regression in vscode.

@msujew
Copy link
Contributor Author

msujew commented Mar 15, 2024

@dimacodota Any chance for a review?

@JonasHelming
Copy link

This fix would be really great to have!

@dimacodota dimacodota self-requested a review June 5, 2024 10:46
Copy link
Contributor

@dimacodota dimacodota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dimacodota dimacodota merged commit 69260da into codota:master Jun 5, 2024
@dimacodota
Copy link
Contributor

will be released in the upcoming release

@msujew msujew deleted the auth-session-change branch June 5, 2024 11:19
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.

3 participants