diff --git a/pkg/connector/oauth2.go b/pkg/connector/oauth2.go index 1e496bc94..e3f10a311 100644 --- a/pkg/connector/oauth2.go +++ b/pkg/connector/oauth2.go @@ -117,7 +117,7 @@ func (c *OAuth2Connector) Initiate( stateData.ContinueURL = continueURL } } - return c.InitiateWithState(ctx, stateData, opts, r) + return c.InitiateWithState(ctx, stateData, opts) } // InitiateWithState generates an OAuth2 authorization URL with a custom state. @@ -126,7 +126,6 @@ func (c *OAuth2Connector) InitiateWithState( ctx context.Context, stateData OAuth2State, opts InitiateOptions, - r *http.Request, ) (string, error) { state, err := statelesstoken.NewToken(c.ClientSecret, OAuth2TokenType, OAuth2TokenTTL, stateData) if err != nil { diff --git a/pkg/connector/oauth2_test.go b/pkg/connector/oauth2_test.go index 739e28d30..add85517b 100644 --- a/pkg/connector/oauth2_test.go +++ b/pkg/connector/oauth2_test.go @@ -278,7 +278,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { context.Background(), OAuth2State{OrganizationID: orgID.String(), Provider: "TEST"}, InitiateOptions{Scopes: []string{"read:user", "write:user"}}, - nil, ) require.NoError(t, err) @@ -303,7 +302,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { context.Background(), OAuth2State{OrganizationID: orgID.String(), Provider: "TEST"}, InitiateOptions{}, - nil, ) require.NoError(t, err) @@ -332,7 +330,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { Scopes: []string{"read:user"}, IncludeGrantedScopes: true, }, - nil, ) require.NoError(t, err) @@ -361,7 +358,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { Scopes: []string{"read:user"}, IncludeGrantedScopes: true, }, - nil, ) require.NoError(t, err) @@ -387,7 +383,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { context.Background(), OAuth2State{OrganizationID: orgID.String(), Provider: "TEST"}, InitiateOptions{Scopes: []string{"read:user"}}, - nil, ) require.NoError(t, err) @@ -420,7 +415,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { Scopes: []string{"read:user"}, IncludeGrantedScopes: true, }, - nil, ) require.NoError(t, err) @@ -455,7 +449,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { Scopes: []string{"read:user"}, IncludeGrantedScopes: false, // first install, no existing grant }, - nil, ) require.NoError(t, err) @@ -489,7 +482,6 @@ func TestInitiateWithState_Scopes(t *testing.T) { Scopes: []string{"read:user"}, IncludeGrantedScopes: true, // caller requested, but provider does not support }, - nil, ) require.NoError(t, err)