GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(site): set external auth provider polling status individually by aqandrew · Pull Request #26313 · coder/coder

Conversation

@aqandrew

@aqandrew aqandrew commented Jun 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

fixes #22420
ref DEVEX-369
ref DEVEX-269

The bug on CreateWorkspacePage, where clicking one external auth provider login button disabled all providers' login buttons, was caused by providers all sharing a single polling status ("idle" | "polling" | "abandoned") in the useExternalAuth hook.

changes

  • Instead of setting one status across all providers, the polling status in useExternalAuth is now tracked for each provider in a record whose keys are the providers' IDs.
  • The biggest diff is a new Storybook file CreateWorkspacePage.stories.tsx which reproduces the bug behavior from the issue.
    • Until now we've only had CreateWorkspacePageView.stories.tsx, which isn't able to model the user interactions / API responses needed to verify the bugfix. This file is unchanged.
  • Also deletes CreateWorkspacePage's useExternalAuth hook in favor of the global useExternalAuth hook (see refactor(site): use global useExternalAuth hook for CreateWorkspacePage #26310)

(co-written with Coder Agents)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
aqandrew added 5 commits June 10, 2026 21:47
@aqandrew
test(site/CreateWorkspacePage): add container stories for multi-provi…
fb9d191
…der external auth

Adds CreateWorkspacePage.stories.tsx with four stories covering the
multi-provider external auth bug described in #22420:

- MultipleExternalAuth: both buttons render enabled
- ClickingOneAuthDoesNotDisableOthers: regression test for #22420
- OneProviderAuthenticated: mixed authenticated/unauthenticated state
- SequentialAuthFlow: full polling flow with mockResolvedValueOnce
@aqandrew
fix(site): make external auth polling state per-provider
65aafd0
The external auth polling state was a single shared value for all
providers. Clicking one provider's Login button set the global state to
"polling", which disabled every other provider's button. Users had to
refresh the page between each authentication.

Change the state from a single ExternalAuthPollingState string to a
Record<string, ExternalAuthPollingState> keyed by provider ID. Each
provider now independently tracks idle, polling, and abandoned states.
The query refetchInterval activates when any provider is polling and
each provider has its own 60-second timeout.

Fixes #22420
@aqandrew
style: pnpm format
2880421
@aqandrew
refactor: move MockGitLabExternalAuth to entities.ts and rename it to…
21f4b7b
… MockTemplateVersionExternalAuthAzure
@aqandrew
refactor: declare isPollingExternalAuth and shouldRetry for each miss…
a61402f
…ed external auth
@linear-code

linear-code Bot commented Jun 11, 2026

Copy link
Copy Markdown

DEVEX-369

DEVEX-269

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned aqandrew Jun 11, 2026
@aqandrew
refactor: use global useExternalAuth hook for CreateWorkspacePage
2403e75
@aqandrew aqandrew mentioned this pull request Jun 11, 2026
refactor(site): use global useExternalAuth hook for CreateWorkspacePage #26310
Closed
aqandrew added 3 commits June 11, 2026 22:08
@aqandrew
test: expect Azure button instead of GitLab button
68b584f
@aqandrew
refactor: use descriptive variable name when evaluating pollingIds
b5d5697
@aqandrew
test: don't wait for Azure button to be enabled
a396269
aqandrew
aqandrew commented Jun 11, 2026
View reviewed changes
Comment thread site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aqandrew
aqandrew requested review from aslilac and jaaydenh June 11, 2026 23:20
@aqandrew
aqandrew marked this pull request as ready for review June 11, 2026 23:20
aslilac
aslilac approved these changes Jun 16, 2026
View reviewed changes
@aqandrew
test: add story for TaskPrompt with multiple missing external auth pr…
b8da84e
…oviders
@aqandrew
aqandrew merged commit 61fa2ab into main Jun 18, 2026
28 of 30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@aqandrew
aqandrew deleted the aqandrew/fix-multiple-external-auth-refresh branch June 18, 2026 18:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
@matifali matifali added the cherry-pick label Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@aslilac aslilac aslilac approved these changes
@jaaydenh jaaydenh Awaiting requested review from jaaydenh

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@aqandrew aqandrew

Labels

cherry-pick

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug: Clicking one external auth button disables all other auth buttons on workspace creation page

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@aqandrew @aslilac @matifali
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.