Skip to content

Conversation

kylecarbs
Copy link
Member

This actually took a lot more jank than anticipated, so I wanted to split this up before adding the ability to embed new providers.

This actually took a lot more jank than anticipated,
so I wanted to split this up before adding the ability
to embed new providers.
@kylecarbs kylecarbs self-assigned this Sep 29, 2023
@Emyrk
Copy link
Member

Emyrk commented Sep 29, 2023

Is the goal to add more oauth2 providers?

@kylecarbs
Copy link
Member Author

@Emyrk the goal is to enable any OAuth2 or OIDC provider to become a "Click to Login" during workspace creation.

Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Pretty sure I commented on the only actual Go code changes that are not just a rename refactor. If that is all this PR is (A rename refactor), then green check the Go code.

I have not looked at all the existing tests for external auth, but if we are going to refactor/add/modify them, lets use the oidctest package and do it right.

@@ -628,7 +628,7 @@ func TestCreateWithGitAuth(t *testing.T) {
clitest.Start(t, inv)

pty.ExpectMatch("You must authenticate with GitHub to create a workspace")
resp := coderdtest.RequestGitAuthCallback(t, "github", client)
resp := coderdtest.RequestExternalAuthCallback(t, "github", client)
Copy link
Member

Choose a reason for hiding this comment

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

We should really switch these to the oidctest package. OIDC is a super set of oauth2 right?

Will be fun... more test refactoring 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, we def should. When I make the actual changes I will look into this

@kylecarbs kylecarbs merged commit 5596fb2 into main Sep 30, 2023
@kylecarbs kylecarbs deleted the gitauthexternal branch September 30, 2023 19:30
@github-actions github-actions bot locked and limited conversation to collaborators Sep 30, 2023
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.

2 participants