Skip to content

fix: disable auto-create if external auth requirements aren't met #12538

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 15 commits into from
Mar 19, 2024

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented Mar 11, 2024

Closes #12491

Basically, mode=auto should be ignored if a required auth provider is missing

@aslilac aslilac requested review from a team and BrunoQuaresma and removed request for a team March 12, 2024 21:19
@aslilac aslilac marked this pull request as ready for review March 12, 2024 21:19
@BrunoQuaresma
Copy link
Collaborator

I'm missing a test for this use case.

@matifali
Copy link
Member

matifali commented Mar 13, 2024

Will disabling this point the user to authenticate with the external provider and then auto create the workspace?

@aslilac
Copy link
Member Author

aslilac commented Mar 13, 2024

Will disabling this point the user to authenticate with the external provider and then auto create the workspace?

it'll just show them the normal form, and they'll have to click "create" when they've connected.

@aslilac
Copy link
Member Author

aslilac commented Mar 14, 2024

ok, I've hit a weird block with this.

I can add .skip to the new test, and the entire rest of the test suite will pass. I can add .only to the new test, and it will run by itself and pass. but for some reason, in full runs, it causes other tests to fail.

@BrunoQuaresma any ideas why? I tried with msw instead of mocking as well, but that had a similar problem.

@BrunoQuaresma
Copy link
Collaborator

@aslilac Unfortunately I don't 😢 and this is sort of related to the issue that I'm facing here #12597

Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the test and the new error helper function 👍

@aslilac aslilac merged commit 9028717 into main Mar 19, 2024
@aslilac aslilac deleted the pause-auto-mode branch March 19, 2024 22:42
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2024
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.

Bug: Launching a workspace withmode=auto does not check for required external authentication for the template
3 participants