Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove legacy notify
  • Loading branch information
kylecarbs committed Jun 28, 2023
commit 18022ba60b51f76c8bea27d3fc5fe9fb3bac5791
3 changes: 1 addition & 2 deletions cli/cliui/gitauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cliui_test

import (
"context"
"net/url"
"sync/atomic"
"testing"
"time"
Expand Down Expand Up @@ -33,7 +32,7 @@ func TestGitAuth(t *testing.T) {
ID: "github",
Type: codersdk.GitProviderGitHub,
Authenticated: fetched.Load(),
AuthenticateURL: "https://example.com/gitauth/github?redirect=" + url.QueryEscape("/gitauth?notify"),
AuthenticateURL: "https://example.com/gitauth/github",
}}, nil
},
FetchInterval: time.Millisecond,
Expand Down
8 changes: 0 additions & 8 deletions coderd/templateversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,6 @@ func (api *API) templateVersionGitAuth(rw http.ResponseWriter, r *http.Request)
})
return
}
query := redirectURL.Query()
// The frontend uses a BroadcastChannel to notify listening pages for
// Git auth updates if the "notify" query parameter is set.
//
// It's important we do this in the backend, because the same endpoint
// is used for CLI authentication.
query.Add("redirect", "/gitauth?notify")
redirectURL.RawQuery = query.Encode()

provider := codersdk.TemplateVersionGitAuth{
ID: config.ID,
Expand Down