Repository navigation
fix(oauth): forget a deleted user's token in the latest installation - #2784
Draft
WilliamBergamin wants to merge 1 commit into
Draft
WilliamBergamin wants to merge 1 commit into
WilliamBergamin wants to merge 1 commit into
Conversation
FileInstallationStore.deleteInstallation with a userId removed only the user-<id>-* files. When that user was also the latest installer, app-latest kept their user token, so fetchInstallation for them still returned it. Deleting a user now clears their credentials from app-latest and keeps the bot.
🦋 Changeset detectedLatest commit: 2423818 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2784 +/- ##
==========================================
+ Coverage 89.40% 89.46% +0.05%
==========================================
Files 65 65
Lines 10545 10548 +3
Branches 478 478
==========================================
+ Hits 9428 9437 +9
+ Misses 1086 1080 -6
Partials 31 31
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request makes
FileInstallationStore.deleteInstallation({ userId })forget that user's token in the latest installation.user-<id>-*files. When that user was also the latest installer,app-latestkept their token, sofetchInstallation({ userId })still returned it.app-latestis reduced to{ id }when it matches; the bot and other users are untouched.app-<timestamp>copies are unchanged, sincefetchInstallationnever reads them.Testing
installationStore.deleteInstallation({ teamId, userId })with your user ID.fetchInstallation({ teamId, userId })returns no user token (before this change it still did).Requirements
🤖 Generated with Claude Code