Skip to content

Commit

Permalink
fix: assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Sep 2, 2024
1 parent 3ddc46f commit e56f142
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions selfservice/strategy/oidc/strategy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,10 +774,7 @@ func TestStrategy(t *testing.T) {
require.NoError(t, err)
require.NoError(t, res.Body.Close())

// The reason for `invalid_client` here is that the code was already used and the session was already authenticated. The invalid_client
// happens because of the way Golang's OAuth2 library is trying out different auth methods when a token request fails, which obfuscates
// the underlying error.
assert.Contains(t, string(body), "invalid_client", "%s", body)
assertSystemErrorWithMessage(t, res, body, http.StatusInternalServerError, "The authorization code has already been used.")
})
})

Expand Down

0 comments on commit e56f142

Please sign in to comment.