Nerzal / gocloak

golang keycloak client
Apache License 2.0
1.03k stars 283 forks source link

GetUserInfo returns JSON parse error #433

Closed Kopleman closed 1 year ago

Kopleman commented 1 year ago

Describe the bug Till yesterday everything works like a charm, but now I have a bug with GetUserInfo func.

To Reproduce Steps to reproduce the behavior:

  1. realm="my-realm" grantType := "authorization_code" clientId := "some-id" clientSecter := "secret" code := "some-code" redirectUrl :="some-uri" clientSecret tokens, err := client.GetToken(ctx, realm, gocloak.TokenOptions{ GrantType: &grantType, ClientID: &clientId, ClientSecret: &clientSecret, Code: &code, RedirectURI: &redirectUri, })
  2. Use fetched tokens for user info userInfo, err := client.GetUserInfo(ctx, tokens.AccessToke, realm)
  3. See error - could not get user info: unexpected end of JSON input

Additional context As I mentioned above It have worked till yesterday.