Skip to content

feat: check for external auth before running task #18339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Jun 12, 2025

It seems we do not validate external auth in the backend currently, so I opted to do this in the frontend to match the create workspace page.

Closes #18166

@code-asher code-asher marked this pull request as draft June 12, 2025 01:14
@code-asher code-asher force-pushed the asher/tasks-external-auth branch 2 times, most recently from 3c8ae73 to 324838d Compare June 12, 2025 05:27
@code-asher
Copy link
Member Author

code-asher commented Jun 12, 2025

@bpmct I basically just ported over the external auth section from the create workspace page, except I only show the section if there is auth that needs to be connected. The run task button is disabled until authed. wdyt?

recording.mp4

@code-asher code-asher marked this pull request as ready for review June 12, 2025 05:35
@code-asher code-asher requested review from hugodutka and bpmct June 12, 2025 05:35
@bpmct
Copy link
Member

bpmct commented Jun 12, 2025

Works for me!

@code-asher code-asher requested a review from BrunoQuaresma June 12, 2025 17:06
@code-asher
Copy link
Member Author

tagging @BrunoQuaresma for a sanity check on the frontend

@BrunoQuaresma
Copy link
Collaborator

I think we can have a better design for this, but I'm going to approve it for now since it is working as expected. In my head, the "Login with GitHub" should appear on the right side of the "select" to keep it close to its context.

@code-asher
Copy link
Member Author

code-asher commented Jun 12, 2025

Yeah I think we can def have a better design, I just copied what was on the create workspace page lol

One thing to keep in mind is there could be many login buttons (we only have two on dev.coder.com but in theory there could be an infinite number). Maybe we have a single "login" button that opens a dialog with all the external auth options.

@code-asher code-asher force-pushed the asher/tasks-external-auth branch from 324838d to 750f4b6 Compare June 12, 2025 18:50
We will use this on the tasks page.
It seems we do not validate external auth in the backend currently, so I
opted to do this in the frontend to match the create workspace page.
@code-asher code-asher force-pushed the asher/tasks-external-auth branch from 750f4b6 to 8f021d0 Compare June 12, 2025 18:55
@matifali
Copy link
Member

BTW, this seems related to #11367

@code-asher code-asher merged commit bc74166 into main Jun 12, 2025
75 of 77 checks passed
@code-asher code-asher deleted the asher/tasks-external-auth branch June 12, 2025 20:35
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tasks: respect external-auth
5 participants