Repository navigation
fix(mining): clear the re-auth flag when signing in again - #2951
Merged
Merged
Conversation
Reconnecting through the login page with the full scope stored fresh provider tokens but never cleared needs_reauth, so the source card kept showing "credentials expired" and the reconnect button. - mining-sources POST / now clears the health flag (and notified_at) after storing fresh credentials, using the same helper as the OAuth callback. - the sign-in listener re-posts the provider tokens when the existing source needs re-auth, instead of skipping every source that already exists. Healthy sources are left untouched.
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.
Signing in again with the full scope stored fresh provider tokens but left
needs_reauthset, so the source kept showing "credentials expired".mining-sourcesPOST /now clearshealth.state(andnotified_at) after storing fresh credentials — same helper as the OAuth callback.Tested:
write-path.test.ts(11 passed, incl. new POST-clears-flag case),auth-first-signin-gating.test.ts(8 passed),deno check, eslint, prettier.