Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in BlizzClient.TokenValidation #67

Open
jrsmile opened this issue Feb 12, 2024 · 0 comments
Open

Error in BlizzClient.TokenValidation #67

jrsmile opened this issue Feb 12, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jrsmile
Copy link

jrsmile commented Feb 12, 2024

Hi, im sorry to not be able to give more information but i found a strange error:

when using:

	validation, _, err := euBlizzClient.TokenValidation(context.Background(), token)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
	}

	err = e.Encode(validation)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}

i get the following output:

invalid character '<' looking for beginning of value
{
  "exp": 0,
  "user_name": "",
  "authorities": null,
  "client_id": "",
  "scope": null
}

i can validate the received token myself and use it for other functions like Userinfo just fine, only the validation function seems to have a problem.
i am using the following settings:

	euBlizzClient, err = blizzard.NewClient(blizzard.Config{
		ClientID:     clientID,
		ClientSecret: clientSecret,
		HTTPClient:   http.DefaultClient,
		Region:       blizzard.EU,
		Locale:       blizzard.DeDE,

while trying to find why this happens, i checked the wow dev documentation, they say:

We strongly recommend that developers use the more secure POST /oauth/check_token method.
@FuzzyStatic FuzzyStatic added bug Something isn't working help wanted Extra attention is needed labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants