Skip to content

fix(mining): clear the re-auth flag when signing in again - #2951

Merged
malek10xdev merged 1 commit into
mainfrom
fix/clear-reauth-on-signin
Oct 23, 2026
Merged

malek10xdev merged 1 commit into
mainfrom
fix/clear-reauth-on-signin

Conversation

@malek10xdev

Copy link
Copy Markdown
Collaborator

Signing in again with the full scope stored fresh provider tokens but left needs_reauth set, so the source kept showing "credentials expired".

  • mining-sources POST / now clears health.state (and notified_at) after storing fresh credentials — same helper as the OAuth callback.
  • The sign-in listener re-posts provider tokens when the existing source needs re-auth instead of skipping every existing source. Healthy sources are left untouched.

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.

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.
@malek10xdev
malek10xdev merged commit 6cf1140 into main Oct 23, 2026
13 checks passed
@malek10xdev
malek10xdev deleted the fix/clear-reauth-on-signin branch October 23, 2026 14:57
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.

1 participant