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

Battle.Net does not work with current API #258

Open
Gunner245 opened this issue Aug 15, 2019 · 2 comments
Open

Battle.Net does not work with current API #258

Gunner245 opened this issue Aug 15, 2019 · 2 comments

Comments

@Gunner245
Copy link

Hi,

I have been attempting to use the provider for battle.net and it timesout on redirecting back to my site when trying to get userid and battletag.

I downloaded the source and have done some debugging and reason for this is that BattleNetAuthenticationHandler.cs has two calls to get this data from:
_accountUserIdEndpoint = "https://eu.api.battle.net/account/user/id";
_accountUserBattleTagEndpoint = "https://eu.api.battle.net/account/user/battletag";

Both these urls just timeout. The current docs (https://develop.battle.net/documentation/guides/using-oauth) say to use:
https://{region}.battle.net/oauth/userinfo

This returns both the userid and the battle tag in one call.

Also, the regions enum has options for Korea and Taiwan, but the current docs have these merged into a signle "Asia-Pacific" region.

I have fixed this on my local copy, and updated the authenticated context to take the user data as one JObject. So this is now working for me.

Let me know if you are happy to receive a PR for these changes.

@KetaSwe
Copy link
Contributor

KetaSwe commented Aug 19, 2019

That's great! I've stopped using it a long time ago so I've not been following up on changes to the OAuth API. So at least for me it would be great if you create a PR with the updates.

@TerribleDev
Copy link
Owner

I'm on holiday, but I can get it merged next week when I'm back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants