OAuth callback does not update wizard state — tokens stored but unusable #8
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
blocked:verify-failed
bug
feature-request
quickfix
security/high
security/medium
test-coverage
triage-approved
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/GSD2_agent#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
Files:
src/components/wizard/OAuthCallback.tsx,src/lib/oauth.tsIssue: The OAuth flow works through these steps:
initiateOAuthFlow()redirects to provider/oauth/callbackhandleOAuthCallback()exchanges the code for tokens and stores them viastoreTokens()window.location.origin + pathname)Problem: After step 4, the wizard state still has:
state.useOAuth === false(because the OAuthCallback never callsupdateState({ useOAuth: true }))state.apiKey ===(no API key was entered, OAuth was used instead)This means the ProviderStep will show as unconfigured, and downstream LLM calls won't find the OAuth tokens. The
getAuthToken()function in oauth.ts does check for stored tokens, but theshouldUseOAuth()function depends onstate.useOAuthbeing true.Fix: The OAuthCallback component should call the wizard's
updateStateto setuseOAuth: trueafter a successful token exchange. Currently OAuthCallback is rendered outside the WizardProvider context in App.tsx.