oauth2-bnet icon indicating copy to clipboard operation
oauth2-bnet copied to clipboard

getResourceOwner Question

Open gsdevme opened this issue 9 years ago • 6 comments

Shouldn't the end point of this be https://eu.api.battle.net/account/user

gsdevme avatar Jan 15 '16 00:01 gsdevme

It's chiefly a contextual thing. id and BattleTag are the only two fields retrieved from account/user altogether not very helpful.

The context of the applications using this are things where they want to prove ownership of an SC2 account, and then get the associated details. Stuff like your clan, your profile image, that is relevant information in the context that this application is used. BattleTag... eh not so much. For the use-case of this the /sc2/profile and wow/profile urls are just so much more useful.

tpavlek avatar Jan 15 '16 00:01 tpavlek

Yeah I understand, just in terms of unique user I need the battletag / id ... seems odd that getResourceOwner doesn't return the "user"

gsdevme avatar Jan 15 '16 00:01 gsdevme

It does return a unique user in the context of each provider. The person with that SC2 ID or that WoW ID will be the only user within each of those game's worlds. Yeah, this package doesn't directly mirror battle.net's account system, but that's an easy fix. You already get back an access token in the flow - you could just make another HTTP request to the account/user endpoint with your access token and get the details you need.

On Thu, Jan 14, 2016 at 5:28 PM, Gavin Staniforth [email protected] wrote:

Yeah I understand, just in terms of unique user I need the battletag / id ... seems odd that getResourceOwner doesn't return the "user"

— Reply to this email directly or view it on GitHub https://github.com/tpavlek/oauth2-bnet/issues/6#issuecomment-171828406.

Troy Pavlek Software Developer http://tpavlek.me

tpavlek avatar Jan 15 '16 00:01 tpavlek

The WoWProfile returns multiple characters so its not really unique as you can delete characters in the game..

However yes Im going to wrap it and make a second call against the account/user

gsdevme avatar Jan 15 '16 00:01 gsdevme

That's perfectly reasonable - it might make more sense to query account/user from the WoW side. I don't actually have a WoW account, and the nature of Blizz's API docs is such that I have literally no idea what the wow endpoints return.

On Thu, Jan 14, 2016 at 5:33 PM, Gavin Staniforth [email protected] wrote:

The WoWProfile returns multiple characters so its not really unique as you can delete characters in the game..

However yes Im going to wrap it and make a second call against the account/user

— Reply to this email directly or view it on GitHub https://github.com/tpavlek/oauth2-bnet/issues/6#issuecomment-171829141.

Troy Pavlek Software Developer http://tpavlek.me

tpavlek avatar Jan 15 '16 00:01 tpavlek

Just ran into this, the wow endpoint returns a list of characters. But no Id's so nothing to identify a character by when it gets renamed or moves realm. Are there plans to add the battletag to the user object?

WyriHaximus avatar Apr 01 '18 21:04 WyriHaximus